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

Unified Diff: tools/filtermain.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/dump_record.cpp ('k') | tools/gpuveto.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/filtermain.cpp
diff --git a/tools/filtermain.cpp b/tools/filtermain.cpp
index 9df6c078e7a431c5cc6516c40c72126681c18f5b..a7ed20d9286a05f4195d9fd4e54e555d646b6ae6 100644
--- a/tools/filtermain.cpp
+++ b/tools/filtermain.cpp
@@ -677,8 +677,8 @@ static int filter_picture(const SkString& inFile, const SkString& outFile) {
memset(localCount, 0, sizeof(localCount));
- SkDebugCanvas debugCanvas(inPicture->width(), inPicture->height());
- debugCanvas.setBounds(inPicture->width(), inPicture->height());
+ SkDebugCanvas debugCanvas(SkScalarCeilToInt(inPicture->cullRect().width()),
+ SkScalarCeilToInt(inPicture->cullRect().height()));
inPicture->draw(&debugCanvas);
// delete the initial save and restore since replaying the commands will
@@ -717,7 +717,9 @@ static int filter_picture(const SkString& inFile, const SkString& outFile) {
if (!outFile.isEmpty()) {
SkPictureRecorder recorder;
- SkCanvas* canvas = recorder.beginRecording(inPicture->width(), inPicture->height(), NULL, 0);
+ SkCanvas* canvas = recorder.beginRecording(inPicture->cullRect().width(),
+ inPicture->cullRect().height(),
+ NULL, 0);
debugCanvas.draw(canvas);
SkAutoTUnref<SkPicture> outPicture(recorder.endRecording());
« no previous file with comments | « tools/dump_record.cpp ('k') | tools/gpuveto.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698