diff options
author | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-12 17:58:15 +0000 |
---|---|---|
committer | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-12 17:58:15 +0000 |
commit | 8cdf0f52ff395d4053f7ed5c20861c42eba25d31 (patch) | |
tree | 4455a49c8761c38b489ab5dd2733d9066ef503de /include/core | |
parent | 31114c69f39befd50d2b755b7d0dd1cda2c6d2ab (diff) |
Adding quickContains API method to SkClipStack
BUG=http://code.google.com/p/chromium/issues/detail?id=164580
TEST=unit test ClipStack/quickContains
Review URL: https://codereview.appspot.com/6919044
git-svn-id: http://skia.googlecode.com/svn/trunk@6760 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkClipStack.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/core/SkClipStack.h b/include/core/SkClipStack.h index 52b1b225eb..b39c5af6e1 100644 --- a/include/core/SkClipStack.h +++ b/include/core/SkClipStack.h @@ -292,6 +292,13 @@ public: */ bool intersectRectWithClip(SkRect* devRect) const; + /** + * Returns true if the input rect in device space is entirely contained + * by the clip. A return value of false does not guarantee that the rect + * is not contained by the clip. + */ + bool quickContains(const SkRect& devRect) const; + void clipDevRect(const SkIRect& ir, SkRegion::Op op) { SkRect r; r.set(ir); |