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

Unified Diff: src/core/SkCanvas.cpp

Issue 983243003: optimization/fix: dirty the clip-bounds when we mod the clip in savelayer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix ws nit Created 5 years, 9 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 | « no previous file | tests/QuickRejectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index e4c03f3e5e0857464e52a43be2fa1518854d6e25..55b3b7ba7a7987ec878e82692eb94fc94cf98506 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -831,7 +831,7 @@ static bool bounds_affects_clip(SkCanvas::SaveFlags flags) {
}
bool SkCanvas::clipRectBounds(const SkRect* bounds, SaveFlags flags,
- SkIRect* intersection, const SkImageFilter* imageFilter) {
+ SkIRect* intersection, const SkImageFilter* imageFilter) {
SkIRect clipBounds;
SkRegion::Op op = SkRegion::kIntersect_Op;
if (!this->getClipDeviceBounds(&clipBounds)) {
@@ -854,6 +854,7 @@ bool SkCanvas::clipRectBounds(const SkRect* bounds, SaveFlags flags,
// early exit if the layer's bounds are clipped out
if (!ir.intersect(clipBounds)) {
if (bounds_affects_clip(flags)) {
+ fCachedLocalClipBoundsDirty = true;
fMCRec->fRasterClip.setEmpty();
}
return false;
@@ -863,6 +864,7 @@ bool SkCanvas::clipRectBounds(const SkRect* bounds, SaveFlags flags,
}
if (bounds_affects_clip(flags)) {
+ fCachedLocalClipBoundsDirty = true;
fClipStack->clipDevRect(ir, op);
// early exit if the clip is now empty
if (!fMCRec->fRasterClip.op(ir, op)) {
« no previous file with comments | « no previous file | tests/QuickRejectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698