aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPathMeasure.h
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-12-18 07:03:13 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-18 07:03:13 -0800
commitf97aa74fea0133378e64700e30a7c2962212fcb5 (patch)
tree73b86805b0d64cbd0c38adc2455fe9445c9272f1 /include/core/SkPathMeasure.h
parentdb7dc09e526e815ade242e3dcb066693c42c8bda (diff)
fix large dashed paths
Paths with lots of points exceed the 32767 point index. Make the index larger, add a test, and allow the t value to use the extra bits. R=reed@google.com,fmalita@chromium.org BUG=skia:3501 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534223002 Review URL: https://codereview.chromium.org/1534223002
Diffstat (limited to 'include/core/SkPathMeasure.h')
-rw-r--r--include/core/SkPathMeasure.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/core/SkPathMeasure.h b/include/core/SkPathMeasure.h
index f6e606f0c0..7528736ba8 100644
--- a/include/core/SkPathMeasure.h
+++ b/include/core/SkPathMeasure.h
@@ -89,8 +89,12 @@ private:
struct Segment {
SkScalar fDistance; // total distance up to this point
- unsigned fPtIndex : 15; // index into the fPts array
+ unsigned fPtIndex; // index into the fPts array
+#ifdef SK_SUPPORT_LEGACY_PATH_MEASURE_TVALUE
unsigned fTValue : 15;
+#else
+ unsigned fTValue : 30;
+#endif
unsigned fType : 2;
SkScalar getScalarT() const;