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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 183453002: add new onClip* methods to SkCanvas (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: remove debug 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
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicturePlayback.cpp
===================================================================
--- src/core/SkPicturePlayback.cpp (revision 13622)
+++ src/core/SkPicturePlayback.cpp (working copy)
@@ -819,7 +819,8 @@
size_t offsetToRestore = reader.readInt();
SkASSERT(!offsetToRestore || \
offsetToRestore >= reader.offset());
- if (!canvas.clipPath(path, regionOp, doAA) && offsetToRestore) {
+ canvas.clipPath(path, regionOp, doAA);
+ if (canvas.isClipEmpty() && offsetToRestore) {
#ifdef SPEW_CLIP_SKIPPING
skipPath.recordSkip(offsetToRestore - reader.offset());
#endif
@@ -834,7 +835,8 @@
size_t offsetToRestore = reader.readInt();
SkASSERT(!offsetToRestore || \
offsetToRestore >= reader.offset());
- if (!canvas.clipRegion(region, regionOp) && offsetToRestore) {
+ canvas.clipRegion(region, regionOp);
+ if (canvas.isClipEmpty() && offsetToRestore) {
#ifdef SPEW_CLIP_SKIPPING
skipRegion.recordSkip(offsetToRestore - reader.offset());
#endif
@@ -849,7 +851,8 @@
size_t offsetToRestore = reader.readInt();
SkASSERT(!offsetToRestore || \
offsetToRestore >= reader.offset());
- if (!canvas.clipRect(rect, regionOp, doAA) && offsetToRestore) {
+ canvas.clipRect(rect, regionOp, doAA);
+ if (canvas.isClipEmpty() && offsetToRestore) {
#ifdef SPEW_CLIP_SKIPPING
skipRect.recordSkip(offsetToRestore - reader.offset());
#endif
@@ -865,7 +868,8 @@
size_t offsetToRestore = reader.readInt();
SkASSERT(!offsetToRestore || \
offsetToRestore >= reader.offset());
- if (!canvas.clipRRect(rrect, regionOp, doAA) && offsetToRestore) {
+ canvas.clipRRect(rrect, regionOp, doAA);
+ if (canvas.isClipEmpty() && offsetToRestore) {
#ifdef SPEW_CLIP_SKIPPING
skipRRect.recordSkip(offsetToRestore - reader.offset());
#endif
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698