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

Unified Diff: src/core/SkRecordDraw.cpp

Issue 817483004: Fix computation of bound in FillBounds::updateSaveBounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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: src/core/SkRecordDraw.cpp
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index 6a2a5e3677b4395b980f6e0b23b110ddafc5fd89..3d6f3a032159e0f67a0c35dcd1cc59c85b5e9fb8 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -220,7 +220,10 @@ public:
// Nothing can draw outside the current clip.
// (Only bounded ops call into this method, so oddballs like Clear don't matter here.)
- rect.intersect(fCurrentClipBounds);
+ if (!rect.intersect(fCurrentClipBounds)) {
+ return Bounds::MakeEmpty();
+ }
+
return rect;
}
« 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