aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPathEffect.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-24 21:03:11 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-24 21:03:11 +0000
commit4bbdeac58cc928dc66296bde3bd06e78070d96b7 (patch)
tree71033489f3f329bfc8c422c6e04e1df5b734cdb0 /include/core/SkPathEffect.h
parent82502e2e3966a9b0e48665f20154eaacd2a452b3 (diff)
add optional cull-rect to patheffects, so they can do less work if their results
lie outside of the current clip-bounds (the cull rect). Review URL: https://codereview.appspot.com/7206044 git-svn-id: http://skia.googlecode.com/svn/trunk@7378 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkPathEffect.h')
-rw-r--r--include/core/SkPathEffect.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/core/SkPathEffect.h b/include/core/SkPathEffect.h
index f9495cdc73..7a982f40f1 100644
--- a/include/core/SkPathEffect.h
+++ b/include/core/SkPathEffect.h
@@ -49,7 +49,7 @@ public:
* resulting stroke-rec to dst and then draw.
*/
virtual bool filterPath(SkPath* dst, const SkPath& src,
- SkStrokeRec*) const = 0;
+ SkStrokeRec*, const SkRect* cullR) const = 0;
/**
* Compute a conservative bounds for its effect, given the src bounds.
@@ -103,7 +103,8 @@ public:
* optionally return the points in 'results'.
*/
virtual bool asPoints(PointData* results, const SkPath& src,
- const SkStrokeRec&, const SkMatrix&) const;
+ const SkStrokeRec&, const SkMatrix&,
+ const SkRect* cullR) const;
protected:
SkPathEffect(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
@@ -154,7 +155,7 @@ public:
: INHERITED(outer, inner) {}
virtual bool filterPath(SkPath* dst, const SkPath& src,
- SkStrokeRec*) const SK_OVERRIDE;
+ SkStrokeRec*, const SkRect*) const SK_OVERRIDE;
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect)
@@ -185,7 +186,7 @@ public:
: INHERITED(first, second) {}
virtual bool filterPath(SkPath* dst, const SkPath& src,
- SkStrokeRec*) const SK_OVERRIDE;
+ SkStrokeRec*, const SkRect*) const SK_OVERRIDE;
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect)