Optimize correct picture in bench_pictures when using --bbh
Almost all PictureRenderer::init implementations have the power to overwrite the picture. Retrieve the correct SkPicture from the renderer for optimization.
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/428883008
diff --git a/tools/PictureBenchmark.cpp b/tools/PictureBenchmark.cpp
index e2a726f..8a714ca 100644
--- a/tools/PictureBenchmark.cpp
+++ b/tools/PictureBenchmark.cpp
@@ -74,7 +74,7 @@
if (fPreprocess) {
if (NULL != fRenderer->getCanvas()) {
- fRenderer->getCanvas()->EXPERIMENTAL_optimize(pict);
+ fRenderer->getCanvas()->EXPERIMENTAL_optimize(fRenderer->getPicture());
}
}