speed up benches: postpone hash computation in PictureRenderer.cpp
fixes phantom performance regression after https://codereview.chromium.org/273783004
R=borenet@google.com, bensong@google.com
Author: epoger@google.com
Review URL: https://codereview.chromium.org/299763002
git-svn-id: http://skia.googlecode.com/svn/trunk@14819 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index 12f0afa..b15b4a7 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -298,9 +298,9 @@
// TODO(epoger): what about including the config type within outputFilename? That way,
// we could combine results of different config types without conflicting filenames.
SkString outputFilename;
- const ImageDigest *imageDigestPtr = bitmapAndDigest.getImageDigestPtr();
const char *outputSubdirPtr = NULL;
if (useChecksumBasedFilenames) {
+ const ImageDigest *imageDigestPtr = bitmapAndDigest.getImageDigestPtr();
outputSubdirPtr = escapedInputFilename.c_str();
outputFilename.set(imageDigestPtr->getHashType());
outputFilename.append("_");