Bug 1294969 - Path flattening should not skip the first inflection point if it is at t=0.0. r=Bas
authorNicolas Silva <nsilva@mozilla.com>
Tue, 16 Aug 2016 15:42:57 +0200
changeset 309624 c76190898611d3d5b111462daa1487986e5417a6
parent 309623 23ba2c37b8ef5fe6eee5ee16ea48a3f60123fea1
child 309625 d549127154b404aaf371213bc33cce95c846b633
push id30565
push userkwierso@gmail.com
push dateWed, 17 Aug 2016 00:07:29 +0000
treeherdermozilla-central@1a0e253638fe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas
bugs1294969
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1294969 - Path flattening should not skip the first inflection point if it is at t=0.0. r=Bas
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;