Index: src/gpu/GrAAConvexPathRenderer.cpp |
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp |
index e76f0c805a07c07c682be9fbe00dfdf701faba15..cb5683d906a833242120645f439b50db3e475d4f 100644 |
--- a/src/gpu/GrAAConvexPathRenderer.cpp |
+++ b/src/gpu/GrAAConvexPathRenderer.cpp |
@@ -605,20 +605,20 @@ bool GrAAConvexPathRenderer::onDrawPath(const SkPath& origPath, |
GrDrawTarget::AutoStateRestore asr(target, GrDrawTarget::kPreserve_ASRInit); |
GrDrawState* drawState = target->drawState(); |
- GrDrawState::AutoDeviceCoordDraw adcd(drawState); |
- if (!adcd.succeeded()) { |
+ SkMatrix viewMatrix = drawState->getViewMatrix(); |
+ GrDrawState::AutoViewMatrixRestore avmr; |
+ if (!avmr.setIdentity(drawState)) { |
return false; |
} |
- const SkMatrix* vm = &adcd.getOriginalMatrix(); |
// We use the fact that SkPath::transform path does subdivision based on |
// perspective. Otherwise, we apply the view matrix when copying to the |
// segment representation. |
SkPath tmpPath; |
- if (vm->hasPerspective()) { |
- origPath.transform(*vm, &tmpPath); |
+ if (viewMatrix.hasPerspective()) { |
+ origPath.transform(viewMatrix, &tmpPath); |
path = &tmpPath; |
- vm = &SkMatrix::I(); |
+ viewMatrix = SkMatrix::I(); |
} |
QuadVertex *verts; |
@@ -633,7 +633,7 @@ bool GrAAConvexPathRenderer::onDrawPath(const SkPath& origPath, |
SkSTArray<kPreallocSegmentCnt, Segment, true> segments; |
SkPoint fanPt; |
- if (!get_segments(*path, *vm, &segments, &fanPt, &vCount, &iCount)) { |
+ if (!get_segments(*path, viewMatrix, &segments, &fanPt, &vCount, &iCount)) { |
return false; |
} |
@@ -662,8 +662,8 @@ bool GrAAConvexPathRenderer::onDrawPath(const SkPath& origPath, |
// This is valid because all the computed verts are within 1 pixel of the path control points. |
SkRect devBounds; |
- devBounds = origPath.getBounds(); |
- adcd.getOriginalMatrix().mapRect(&devBounds); |
+ devBounds = path->getBounds(); |
+ viewMatrix.mapRect(&devBounds); |
devBounds.outset(SK_Scalar1, SK_Scalar1); |
// Check devBounds |