Index: src/pathops/SkPathOpsConic.cpp |
diff --git a/src/pathops/SkPathOpsConic.cpp b/src/pathops/SkPathOpsConic.cpp |
index f80af036ee20fdd29cfc08bf369c3be21a2c1e78..86bad262e32ba4f72ac7f9949f4556ab814efce9 100644 |
--- a/src/pathops/SkPathOpsConic.cpp |
+++ b/src/pathops/SkPathOpsConic.cpp |
@@ -153,13 +153,8 @@ SkDConic SkDConic::subDivide(double t1, double t2) const { |
double bx = 2 * dx - (ax + cx) / 2; |
double by = 2 * dy - (ay + cy) / 2; |
double bz = 2 * dz - (az + cz) / 2; |
- SkDConic dst = {{{{ax / az, ay / az}, {bx / bz, by / bz}, {cx / cz, cy / cz}}}, 0 }; |
- SkDPoint dMidAC = { (dst.fPts[0].fX + dst.fPts[2].fX) / 2, |
- (dst.fPts[0].fY + dst.fPts[2].fY) / 2 }; |
- SkDPoint dMid = { dx / dz, dy / dz }; |
- SkDVector dWNumer = dMidAC - dMid; |
- SkDVector dWDenom = dMid - dst.fPts[1]; |
- dst.fWeight = dWNumer.length() / dWDenom.length(); |
+ SkDConic dst = {{{{ax / az, ay / az}, {bx / bz, by / bz}, {cx / cz, cy / cz}}}, |
+ SkDoubleToScalar(bz / sqrt(az * cz)) }; |
return dst; |
} |