aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkClipStack.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-06-28 15:23:59 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-28 21:20:32 +0000
commit806be2d50160f540293d9dda13636b63fdfdc47b (patch)
tree4bdc457cd3a0ec360ace068032316720e59ff582 /src/core/SkClipStack.h
parentcf3dc299b9505a9bd6180c48c86af98f2d703d2a (diff)
Improve handling of clip stack ID
Change-Id: I1d5cf06d9b50c370f969a8778181fe94f7d35844 Reviewed-on: https://skia-review.googlesource.com/21061 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/core/SkClipStack.h')
-rw-r--r--src/core/SkClipStack.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/SkClipStack.h b/src/core/SkClipStack.h
index 4502ecdb5f..70f812a825 100644
--- a/src/core/SkClipStack.h
+++ b/src/core/SkClipStack.h
@@ -129,7 +129,7 @@ public:
stack not to the element itself. That is the same clip path in different stacks will
have a different ID since the elements produce different clip result in the context of
their stacks. */
- int32_t getGenID() const { SkASSERT(kInvalidGenID != fGenID); return fGenID; }
+ uint32_t getGenID() const { SkASSERT(kInvalidGenID != fGenID); return fGenID; }
/**
* Gets the bounds of the clip element, either the rect or path bounds. (Whether the shape
@@ -241,7 +241,7 @@ public:
// equivalent to a single rect intersection? IIOW, is the clip effectively a rectangle.
bool fIsIntersectionOfRects;
- int fGenID;
+ uint32_t fGenID;
#if SK_SUPPORT_GPU
mutable SkTArray<std::unique_ptr<GrUniqueKeyInvalidatedMessage>> fMessages;
#endif
@@ -430,13 +430,13 @@ public:
* The generation ID has three reserved values to indicate special
* (potentially ignorable) cases
*/
- static const int32_t kInvalidGenID = 0; //!< Invalid id that is never returned by
- //!< SkClipStack. Useful when caching clips
- //!< based on GenID.
- static const int32_t kEmptyGenID = 1; // no pixels writeable
- static const int32_t kWideOpenGenID = 2; // all pixels writeable
+ static const uint32_t kInvalidGenID = 0; //!< Invalid id that is never returned by
+ //!< SkClipStack. Useful when caching clips
+ //!< based on GenID.
+ static const uint32_t kEmptyGenID = 1; // no pixels writeable
+ static const uint32_t kWideOpenGenID = 2; // all pixels writeable
- int32_t getTopmostGenID() const;
+ uint32_t getTopmostGenID() const;
#ifdef SK_DEBUG
/**
@@ -567,7 +567,7 @@ private:
/**
* Return the next unique generation ID.
*/
- static int32_t GetNextGenID();
+ static uint32_t GetNextGenID();
};
#endif