aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/DashBench.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-25 01:04:12 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-25 01:04:12 +0000
commitfd4be26c4202ae91f0f7cf2c03e44b5169d885eb (patch)
tree9db06c859711d7433330c378b5d552454e7e0438 /bench/DashBench.cpp
parentd3521f1a8dc07fe84d6a8f2151b0c176ff1ec8ca (diff)
Change patheffect to take a (new) StrokeRec object, which encapsulates the fill
or stroke parameters for a path. Today, the patheffect only sees if the caller was going to stroke or fill, and if stroke, it just sees the width. With this change, the effect can see all of the related parameters (e.g. cap/join/miter). No other change is intended at this time. After this change, I hope to use this additional data to allow SkDashPathEffect to, at times, apply the stroke as part of its effect, which may be much more efficient than first dashing, and then reading that and stroking it. Most of these files changed just because of the new parameter to filterPath. The key changes are in SkPathEffect.[h,cpp], SkPaint.cpp and SkScalerContext.cpp Review URL: https://codereview.appspot.com/6250051 git-svn-id: http://skia.googlecode.com/svn/trunk@4048 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/DashBench.cpp')
-rw-r--r--bench/DashBench.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp
index e9969c47ce..215581603e 100644
--- a/bench/DashBench.cpp
+++ b/bench/DashBench.cpp
@@ -204,9 +204,9 @@ protected:
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
SkPath dst;
for (int i = 0; i < N; ++i) {
- SkScalar width = 0;
+ SkStrokeRec rec(SkStrokeRec::kHairline_InitStyle);
- fPE->filterPath(&dst, fPath, &width);
+ fPE->filterPath(&dst, fPath, &rec);
dst.rewind();
}
}