| Index: src/gpu/GrPathUtils.cpp
|
| diff --git a/src/gpu/GrPathUtils.cpp b/src/gpu/GrPathUtils.cpp
|
| index 0fd8b0e8829a0032361205bb6397fb9cc79b06ae..fcb32cbd9a033f5761cd3d05e4058cf21df58e01 100644
|
| --- a/src/gpu/GrPathUtils.cpp
|
| +++ b/src/gpu/GrPathUtils.cpp
|
| @@ -267,9 +267,7 @@ void GrPathUtils::QuadUVMatrix::set(const SkPoint qPts[3]) {
|
| double scale = 1.0/det;
|
|
|
| // compute adjugate matrix
|
| - double a0, a1, a2, a3, a4, a5, a6, a7, a8;
|
| - a0 = y1-y2;
|
| - a1 = x2-x1;
|
| + double a2, a3, a4, a5, a6, a7, a8;
|
| a2 = x1*y2-x2*y1;
|
|
|
| a3 = y2-y0;
|
| @@ -290,15 +288,11 @@ void GrPathUtils::QuadUVMatrix::set(const SkPoint qPts[3]) {
|
| m[SkMatrix::kMScaleY] = (float)(a7*scale);
|
| m[SkMatrix::kMTransY] = (float)(a8*scale);
|
|
|
| - m[SkMatrix::kMPersp0] = (float)((a0 + a3 + a6)*scale);
|
| - m[SkMatrix::kMPersp1] = (float)((a1 + a4 + a7)*scale);
|
| + // kMPersp0 & kMPersp1 should algebraically be zero
|
| + m[SkMatrix::kMPersp0] = 0.0f;
|
| + m[SkMatrix::kMPersp1] = 0.0f;
|
| m[SkMatrix::kMPersp2] = (float)((a2 + a5 + a8)*scale);
|
|
|
| - // The matrix should not have perspective.
|
| - SkDEBUGCODE(static const SkScalar gTOL = 1.f / 100.f);
|
| - SkASSERT(SkScalarAbs(m.get(SkMatrix::kMPersp0)) < gTOL);
|
| - SkASSERT(SkScalarAbs(m.get(SkMatrix::kMPersp1)) < gTOL);
|
| -
|
| // It may not be normalized to have 1.0 in the bottom right
|
| float m33 = m.get(SkMatrix::kMPersp2);
|
| if (1.f != m33) {
|
|
|