diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-01-06 16:54:20 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-01-06 16:54:20 +0000 |
commit | 86b39f311e174ddbd0d2f8de8d18dd45a8a2334f (patch) | |
tree | a97590f426f780c283a22315edc00726771c5e34 /src | |
parent | 7627c657b039ea9aa2a01a7d74e652fe7e27def4 (diff) |
Avoid some work on SkClipStack equality when the topmost genids match
Two clip stacks are defined being equal if the topmost genids match.
R=bsalomon@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/115573005
git-svn-id: http://skia.googlecode.com/svn/trunk@12909 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkClipStack.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp index 53a8888135..c66a219b62 100644 --- a/src/core/SkClipStack.cpp +++ b/src/core/SkClipStack.cpp @@ -406,6 +406,9 @@ SkClipStack& SkClipStack::operator=(const SkClipStack& b) { } bool SkClipStack::operator==(const SkClipStack& b) const { + if (this->getTopmostGenID() == b.getTopmostGenID()) { + return true; + } if (fSaveCount != b.fSaveCount || fDeque.count() != b.fDeque.count()) { return false; |