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

Unified Diff: src/core/SkCanvas.cpp

Issue 164203002: Don't modify the clipstack in saveLayer() if the kClipToLayer_SaveFlag is (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Use allocN32Pixels() shortcut. Created 6 years, 10 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/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index ed8274dc5d3b4a9bf09d6241541620b1a11f9a4f..ecc05ac90097841479b2d7b56275deaefeed5094 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -820,12 +820,12 @@ bool SkCanvas::clipRectBounds(const SkRect* bounds, SaveFlags flags,
ir = clipBounds;
}
- fClipStack.clipDevRect(ir, op);
-
- // early exit if the clip is now empty
- if (bounds_affects_clip(flags) &&
- !fMCRec->fRasterClip->op(ir, op)) {
- return false;
+ if (bounds_affects_clip(flags)) {
+ fClipStack.clipDevRect(ir, op);
+ // early exit if the clip is now empty
+ if (!fMCRec->fRasterClip->op(ir, op)) {
+ return false;
+ }
}
if (intersection) {

Powered by Google App Engine
This is Rietveld 408576698