From 4bbdeac58cc928dc66296bde3bd06e78070d96b7 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Thu, 24 Jan 2013 21:03:11 +0000 Subject: 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 --- src/core/SkPaint.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/SkPaint.cpp') diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp index 8f14ba8b3b..71a68ef1c8 100644 --- a/src/core/SkPaint.cpp +++ b/src/core/SkPaint.cpp @@ -2145,13 +2145,14 @@ SkMaskFilter* SkPaint::setMaskFilter(SkMaskFilter* filter) { /////////////////////////////////////////////////////////////////////////////// -bool SkPaint::getFillPath(const SkPath& src, SkPath* dst) const { +bool SkPaint::getFillPath(const SkPath& src, SkPath* dst, + const SkRect* cullRect) const { SkStrokeRec rec(*this); const SkPath* srcPtr = &src; SkPath tmpPath; - if (fPathEffect && fPathEffect->filterPath(&tmpPath, src, &rec)) { + if (fPathEffect && fPathEffect->filterPath(&tmpPath, src, &rec, cullRect)) { srcPtr = &tmpPath; } -- cgit v1.2.3