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

Unified Diff: tools/PictureRenderer.cpp

Issue 739303005: add clip to PictureRenderer to better mimic Chromium's rendering method (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/PictureRenderer.cpp
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index f2fd6b73fa8d968a902d915fbb4e23f347fe5c6f..33766e96195c58f556e458186afb9da661138373 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -618,6 +618,7 @@ static void draw_tile_to_canvas(SkCanvas* canvas,
SkMatrix mat(canvas->getTotalMatrix());
mat.postTranslate(-SkIntToScalar(tileRect.fLeft), -SkIntToScalar(tileRect.fTop));
canvas->setMatrix(mat);
+ canvas->clipRect(SkRect::Make(tileRect));
canvas->clear(SK_ColorTRANSPARENT); // Not every picture covers the entirety of every tile
canvas->drawPicture(picture);
canvas->restoreToCount(saveCount);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698