)]}'
{
"commit": "26d8d77aae56c20b7174ac06056c1e5ec7903e6b",
"tree": "f2fc34e09b385f29b2c04aa9e1b0172866863b50",
"parents": [
"b8c363836398ec19de70e77bd2b366f5cfa0e142"
],
"author": {
"name": "Mike Reed",
"email": "reed@google.com",
"time": "Tue Nov 27 13:41:57 2018 -0500"
},
"committer": {
"name": "Skia Commit-Bot",
"email": "skia-commit-bot@chromium.org",
"time": "Tue Nov 27 19:36:36 2018 +0000"
},
"message": "don\u0027t trust convexity with affine transforms\n\nIn theory, a convex shape transformed by an affine matrix should still\nbe convex. However, due to numerical nastiness of floats, when we try\nto determine if something is convex, we can get different answers pre\nand post a transformation (think of two line segments nearly colinear).\n\nConvex paths take a faster scan converter, but it is only well behaved\nif the path is, in fact, convex. Thus we have to be conservative about\nwhich paths we mark as convex.\n\nThis bug found a case where a \"convex\" path, after going through a transform,\nbecame (according to our measure) non-convex. The bug was that we *thought*\nthat once convex always convex, but in reality it was not. The fix (hack) is\nto notice when we transform by an affine matrix (we\u0027re still assuming/hoping\nthat scaling and translate keep things convex (1)...) and mark the convexity\nas \"unknown\", forcing us to re-compute it.\n\nThis will slow down these paths, since it costs something to compute convexity.\nHopefully non-scale-translate transforms are rare, so we won\u0027t notice the\nspeed loss too much.\n\n(1) This is not proven. If we find scaling/translation to break our notion of\nconvexity, we\u0027ll need to get more aggressive/clever to find a fix.\n\n\nBug: 899689\nChange-Id: I5921eca247428bf89380bc2395fe373fa70deb1d\nReviewed-on: https://skia-review.googlesource.com/c/173080\nCommit-Queue: Mike Reed \u003creed@google.com\u003e\nReviewed-by: Cary Clark \u003ccaryclark@google.com\u003e\nReviewed-by: Jim Van Verth \u003cjvanverth@google.com\u003e\n",
"tree_diff": [
{
"type": "modify",
"old_id": "af8cf9e0bfd408ff4b0b98209459bbb7f8a464db",
"old_mode": 33188,
"old_path": "src/core/SkPath.cpp",
"new_id": "257a0bde180cccf57031f46253966e35e9148a22",
"new_mode": 33188,
"new_path": "src/core/SkPath.cpp"
},
{
"type": "modify",
"old_id": "febfd4f9769fb664c3082dfec55be012860be272",
"old_mode": 33188,
"old_path": "tests/PathTest.cpp",
"new_id": "5e7f218d9ccfd8206286eac43ec4d6316fa6d3b0",
"new_mode": 33188,
"new_path": "tests/PathTest.cpp"
}
]
}