aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-10-10 21:24:37 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-10-10 21:24:37 +0000
commit5e2457ef2eba0c3f2e4c8fc89be7f36659e4f3b1 (patch)
tree3418fe75b782bb62645295c1d0b51d60a85dac1b /include
parentd1e3c5fde3f2ed309273cb08dbba2309b13e527f (diff)
add getTotalClipBounds() as a partial replacement for getTotalClip. This can be
faster than getTotalClip, since it doesn't need to compute the actual complex region for the answer. git-svn-id: http://skia.googlecode.com/svn/trunk@2452 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/core/SkCanvas.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 6ca9fa08a9..73fd7200ad 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -768,6 +768,14 @@ public:
const SkRegion& getTotalClip() const;
/**
+ * Return true if the current clip is non-empty.
+ *
+ * If bounds is not NULL, set it to the bounds of the current clip
+ * in global coordinates.
+ */
+ bool getTotalClipBounds(SkIRect* bounds) const;
+
+ /**
* Return the current clipstack. This mirrors the result in getTotalClip()
* but is represented as a stack of geometric clips + region-ops.
*/