Beef up GrContext::AutoMatrix to handle doing GrPaint matrix adjustments.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6656047
git-svn-id: http://skia.googlecode.com/svn/trunk@5918 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index 042e030..6846721 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -206,12 +206,13 @@
glyph->fPath = path;
}
- GrContext::AutoMatrix am(fContext, GrContext::AutoMatrix::kPreserve_InitialMatrix);
+ GrContext::AutoMatrix am;
GrMatrix translate;
translate.setTranslate(GrFixedToScalar(vx - GrIntToFixed(glyph->fBounds.fLeft)),
GrFixedToScalar(vy - GrIntToFixed(glyph->fBounds.fTop)));
- fContext->concatMatrix(translate);
- fContext->drawPath(fPaint, *glyph->fPath, kWinding_GrPathFill);
+ GrPaint tmpPaint(fPaint);
+ am.setPreConcat(fContext, translate, &tmpPaint);
+ fContext->drawPath(tmpPaint, *glyph->fPath, kWinding_GrPathFill);
return;
}