Commit d437c79
Revert "don't trust convexity with affine transforms"
This reverts commit 26d8d77.
Reason for revert: speculative, in case this is blocking the chrome roll
Original change's description:
> don't trust convexity with affine transforms
>
> In theory, a convex shape transformed by an affine matrix should still
> be convex. However, due to numerical nastiness 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 colinear).
>
> 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.
>
> This bug found a case where a "convex" path, after going through a transform,
> became (according to our measure) non-convex. The bug was that we *thought*
> that once convex always convex, but in reality it was not. The fix (hack) is
> to notice when we transform by an affine matrix (we're still assuming/hoping
> that scaling and translate keep things convex (1)...) and mark the convexity
> as "unknown", forcing us to re-compute it.
>
> This will slow down these paths, since it costs something to compute convexity.
> Hopefully non-scale-translate transforms are rare, so we won't notice the
> speed loss too much.
>
> (1) This is not proven. If we find scaling/translation to break our notion of
> convexity, we'll need to get more aggressive/clever to find a fix.
>
>
> Bug: 899689
> Change-Id: I5921eca247428bf89380bc2395fe373fa70deb1d
> Reviewed-on: https://skia-review.googlesource.com/c/173080
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Cary Clark <caryclark@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
TBR=mtklein@google.com,jvanverth@google.com,caryclark@google.com,reed@google.com,caryclark@skia.org
Change-Id: I5d846798f2c34c6576591a3c3125cfdc3c72dbdc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 899689
Reviewed-on: https://skia-review.googlesource.com/c/173162
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>1 parent d3efa99 commit d437c79
2 files changed
+0
-70
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1841 | 1841 | | |
1842 | 1842 | | |
1843 | 1843 | | |
1844 | | - | |
1845 | | - | |
1846 | | - | |
1847 | | - | |
1848 | | - | |
1849 | | - | |
1850 | | - | |
1851 | 1844 | | |
1852 | 1845 | | |
1853 | 1846 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5204 | 5204 | | |
5205 | 5205 | | |
5206 | 5206 | | |
5207 | | - | |
5208 | | - | |
5209 | | - | |
5210 | | - | |
5211 | | - | |
5212 | | - | |
5213 | | - | |
5214 | | - | |
5215 | | - | |
5216 | | - | |
5217 | | - | |
5218 | | - | |
5219 | | - | |
5220 | | - | |
5221 | | - | |
5222 | | - | |
5223 | | - | |
5224 | | - | |
5225 | | - | |
5226 | | - | |
5227 | | - | |
5228 | | - | |
5229 | | - | |
5230 | | - | |
5231 | | - | |
5232 | | - | |
5233 | | - | |
5234 | | - | |
5235 | | - | |
5236 | | - | |
5237 | | - | |
5238 | | - | |
5239 | | - | |
5240 | | - | |
5241 | | - | |
5242 | | - | |
5243 | | - | |
5244 | | - | |
5245 | | - | |
5246 | | - | |
5247 | | - | |
5248 | | - | |
5249 | | - | |
5250 | | - | |
5251 | | - | |
5252 | | - | |
5253 | | - | |
5254 | | - | |
5255 | | - | |
5256 | | - | |
5257 | | - | |
5258 | | - | |
5259 | | - | |
5260 | | - | |
5261 | | - | |
5262 | | - | |
5263 | | - | |
5264 | | - | |
5265 | | - | |
5266 | | - | |
5267 | | - | |
5268 | | - | |
5269 | | - | |
0 commit comments