diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkClipStack.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp index 25e8ced29c..ff771c1cbe 100644 --- a/src/core/SkClipStack.cpp +++ b/src/core/SkClipStack.cpp @@ -690,6 +690,7 @@ const SkClipStack::Iter::Clip* SkClipStack::Iter::updateClip( } fClip.fOp = rec->fOp; fClip.fDoAA = rec->fDoAA; + fClip.fGenID = rec->fGenID; return &fClip; } @@ -812,3 +813,13 @@ void SkClipStack::purgeClip(Rec* rec) { int32_t SkClipStack::GetNextGenID() { return sk_atomic_inc(&gGenID); } + +int32_t SkClipStack::getTopmostGenID() const { + + if (fDeque.empty()) { + return kInvalidGenID; + } + + Rec* rec = (Rec*)fDeque.back(); + return rec->fGenID; +} |