aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkClipStack.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/core/SkClipStack.h b/include/core/SkClipStack.h
index 79fd2c9dd4..443e6ad7d9 100644
--- a/include/core/SkClipStack.h
+++ b/include/core/SkClipStack.h
@@ -103,7 +103,7 @@ public:
/**
* The generation ID has three reserved values to indicate special
- * (potentially ignoreable) cases
+ * (potentially ignorable) cases
*/
static const int32_t kInvalidGenID = 0;
static const int32_t kEmptyGenID = 1; // no pixels writeable
@@ -159,6 +159,14 @@ public:
const Clip* prev();
/**
+ * This is a variant of next() that greedily attempts to combine elements when possible.
+ * Currently it attempts to combine intersecting rectangles, though it may do more in the
+ * future. The returned Clip may not refer to a single element in the stack, so its
+ * generation ID may be invalid.
+ */
+ const Clip* nextCombined();
+
+ /**
* Moves the iterator to the topmost clip with the specified RegionOp
* and returns that clip. If no clip with that op is found,
* returns NULL.
@@ -174,7 +182,7 @@ public:
const SkClipStack* fStack;
Clip fClip;
SkDeque::Iter fIter;
-
+ SkRect fCombinedRect; // used for nextCombined()
/**
* updateClip updates fClip to the current state of fIter. It unifies
* functionality needed by both next() and prev().