Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: tools/bench_pictures_main.cpp

Issue 466733004: Update tools for use of picture stats in GPU optimization decision (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/render_pictures_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bench_pictures_main.cpp
diff --git a/tools/bench_pictures_main.cpp b/tools/bench_pictures_main.cpp
index b740877cce053a9fbd530df5787b9ebafc50cee7..ac66dc50d644b1be2a27b6896487def4964bc457 100644
--- a/tools/bench_pictures_main.cpp
+++ b/tools/bench_pictures_main.cpp
@@ -197,6 +197,14 @@ static bool run_single_benchmark(const SkString& inputPath,
return false;
}
+ if (FLAGS_preprocess) {
+ // Because the GPU preprocessing step relies on the in-memory picture
+ // statistics we need to rerecord the picture here
+ SkPictureRecorder recorder;
+ picture->draw(recorder.beginRecording(picture->width(), picture->height(), NULL, 0));
+ picture.reset(recorder.endRecording());
+ }
+
SkString filename = SkOSPath::Basename(inputPath.c_str());
gWriter.bench(filename.c_str(), picture->width(), picture->height());
« no previous file with comments | « no previous file | tools/render_pictures_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698