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

Unified Diff: src/core/SkRecordDraw.cpp

Issue 485703002: Counterproposal for skirting the BBH when the query fully contains the picture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: guard bounds in SkRecordDraw too 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
Index: src/core/SkRecordDraw.cpp
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index bc5e7eb63feef19b231e4834f6c5a0ef3a8a1949..111e4d397794df7cb4e0c6b833da369c1914feff 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -18,8 +18,8 @@ void SkRecordDraw(const SkRecord& record,
// Draw only ops that affect pixels in the canvas's current clip.
SkIRect query;
#if 1 // TODO: Why is this the right way to make the query? I'd think it'd be the else branch.
reed1 2014/08/18 19:42:39 Not sure I follow the comment. Do we want to keep
mtklein 2014/08/18 19:45:24 Yeah, I'd say so, at least until I understand why
reed1 2014/08/18 19:48:54 Ah. Does the comment mean : "why isn't getClipDevi
- SkRect clipBounds;
- canvas->getClipBounds(&clipBounds);
+ SkRect clipBounds = { 0, 0, 0, 0 };
+ (void)canvas->getClipBounds(&clipBounds);
clipBounds.roundOut(&query);
#else
canvas->getClipDeviceBounds(&query);
« src/core/SkPicture.cpp ('K') | « src/core/SkPicture.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698