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

Unified Diff: tools/bench_pictures_main.cpp

Issue 513983002: Try out scalar picture sizes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT again 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 | « tools/PictureRenderer.cpp ('k') | tools/bench_playback.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 ac66dc50d644b1be2a27b6896487def4964bc457..4bb31949c95a7df8c1d9f6b006023fffbf1c1f5a 100644
--- a/tools/bench_pictures_main.cpp
+++ b/tools/bench_pictures_main.cpp
@@ -201,13 +201,17 @@ static bool run_single_benchmark(const SkString& inputPath,
// 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->draw(recorder.beginRecording(picture->cullRect().width(),
+ picture->cullRect().height(),
+ NULL, 0));
picture.reset(recorder.endRecording());
}
SkString filename = SkOSPath::Basename(inputPath.c_str());
- gWriter.bench(filename.c_str(), picture->width(), picture->height());
+ gWriter.bench(filename.c_str(),
+ SkScalarCeilToInt(picture->cullRect().width()),
+ SkScalarCeilToInt(picture->cullRect().height()));
benchmark.run(picture);
« no previous file with comments | « tools/PictureRenderer.cpp ('k') | tools/bench_playback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698