diff options
author | 2018-02-20 09:48:13 -0500 | |
---|---|---|
committer | 2018-02-20 15:13:23 +0000 | |
commit | a3d9e21f0436cf7eb33dee8f060b1332f8cf1b6e (patch) | |
tree | 68038599f3f3a3c4dc15dac75d2bcb39705e31c9 /include | |
parent | cefc1b97405d7bad2c621987394fc2d0c6300887 (diff) |
don't trust stored segment mask
Bug: skia:7604
Change-Id: I508bbdc006e1c6edce2006be0c43b037038c876b
Reviewed-on: https://skia-review.googlesource.com/108360
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/private/SkPathRef.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/private/SkPathRef.h b/include/private/SkPathRef.h index fa764f1a9c..b9b52d41c8 100644 --- a/include/private/SkPathRef.h +++ b/include/private/SkPathRef.h @@ -323,7 +323,7 @@ private: kLegacyIsRRect_SerializationShift = 26, // requires 1 bit, ignored. kIsFinite_SerializationShift = 25, // requires 1 bit kLegacyIsOval_SerializationShift = 24, // requires 1 bit, ignored. - kSegmentMask_SerializationShift = 0 // requires 4 bits + kSegmentMask_SerializationShift = 0 // requires 4 bits (deprecated) }; SkPathRef() { @@ -346,6 +346,9 @@ private: void copy(const SkPathRef& ref, int additionalReserveVerbs, int additionalReservePoints); + // Doesn't read fSegmentMask, but (re)computes it from the verbs array + unsigned computeSegmentMask() const; + // Return true if the computed bounds are finite. static bool ComputePtBounds(SkRect* bounds, const SkPathRef& ref) { return bounds->setBoundsCheck(ref.points(), ref.countPoints()); |