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
diff --git a/src/effects/Sk2DPathEffect.cpp b/src/effects/Sk2DPathEffect.cpp
index a4ebe74..dc15f07 100644
--- a/src/effects/Sk2DPathEffect.cpp
+++ b/src/effects/Sk2DPathEffect.cpp
@@ -17,7 +17,7 @@
}
bool Sk2DPathEffect::filterPath(SkPath* dst, const SkPath& src,
- SkStrokeRec*) const {
+ SkStrokeRec*, const SkRect*) const {
if (!fMatrixIsInvertible) {
return false;
}
@@ -80,8 +80,8 @@
///////////////////////////////////////////////////////////////////////////////
bool SkLine2DPathEffect::filterPath(SkPath* dst, const SkPath& src,
- SkStrokeRec* rec) const {
- if (this->INHERITED::filterPath(dst, src, rec)) {
+ SkStrokeRec* rec, const SkRect* cullRect) const {
+ if (this->INHERITED::filterPath(dst, src, rec, cullRect)) {
rec->setStrokeStyle(fWidth);
return true;
}