diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-18 11:49:00 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-18 11:49:00 +0100 |
commit | 27f45bc243b45a13c65fb42db0369fd8b8317675 (patch) | |
tree | e46064acda7bbc98b79469265d46db8728737525 /gfx | |
parent | ca3861669b4507ab9295370ee14d4f1d6b87e0c2 (diff) | |
download | UXP-27f45bc243b45a13c65fb42db0369fd8b8317675.tar UXP-27f45bc243b45a13c65fb42db0369fd8b8317675.tar.gz UXP-27f45bc243b45a13c65fb42db0369fd8b8317675.tar.lz UXP-27f45bc243b45a13c65fb42db0369fd8b8317675.tar.xz UXP-27f45bc243b45a13c65fb42db0369fd8b8317675.zip |
Don't trust convexity when applying transforms.
In theory, a convex shape transformed by an affine matrix should still
be convex. However, due to numerical imprecision of floats, when we try
to determine if something is convex, we can get different answers pre
and post a transformation (think of two line segments nearly co-linear).
Convex paths take a faster scan converter, but it is only well behaved
if the path is, in fact, convex. Thus we have to be conservative about
which paths we mark as convex, and cant's trust transformed paths to
retain their convexity. We re-calculate when a transform is applied.
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/skia/skia/src/core/SkPath.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gfx/skia/skia/src/core/SkPath.cpp b/gfx/skia/skia/src/core/SkPath.cpp index b7d392025..fc3db3ee5 100644 --- a/gfx/skia/skia/src/core/SkPath.cpp +++ b/gfx/skia/skia/src/core/SkPath.cpp @@ -1744,7 +1744,7 @@ void SkPath::transform(const SkMatrix& matrix, SkPath* dst) const { if (this != dst) { dst->fFillType = fFillType; - dst->fConvexity = fConvexity; + dst->fConvexity = kUnknown_Convexity; dst->fIsVolatile = fIsVolatile; } |