Bug 1294969 - Path flattening should not skip the first inflection point if it is at t=0.0. r=Bas, a=ritu
authorNicolas Silva <nsilva@mozilla.com>
Tue, 16 Aug 2016 15:42:57 +0200
changeset 349898 190417df2e2fec652cfabec2bb9a227f14c0de34
parent 349897 5d048e93dd79fdec483bd4dd2fd5a6a79c965b5a
child 349899 b6788af0c17645f95d93995904b63d7841f035ba
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas, ritu
bugs1294969
milestone50.0a2
Bug 1294969 - Path flattening should not skip the first inflection point if it is at t=0.0. r=Bas, a=ritu
gfx/2d/Path.cpp
--- a/gfx/2d/Path.cpp
+++ b/gfx/2d/Path.cpp
@@ -452,17 +452,17 @@ FlattenBezier(const BezierControlPoints 
 {
   double t1;
   double t2;
   uint32_t count;
 
   FindInflectionPoints(aControlPoints, &t1, &t2, &count);
 
   // Check that at least one of the inflection points is inside [0..1]
-  if (count == 0 || ((t1 <= 0.0 || t1 >= 1.0) && (count == 1 || (t2 <= 0.0 || t2 >= 1.0))) ) {
+  if (count == 0 || ((t1 < 0.0 || t1 >= 1.0) && (count == 1 || (t2 < 0.0 || t2 >= 1.0))) ) {
     FlattenBezierCurveSegment(aControlPoints, aSink, aTolerance);
     return;
   }
 
   double t1min = t1, t1max = t1, t2min = t2, t2max = t2;
 
   BezierControlPoints remainingCP = aControlPoints;