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/GrContext.cpp b/src/gpu/GrContext.cpp
index 8997280..ee3a4e1 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -603,12 +603,10 @@
}
inverse.mapRect(&r);
} else {
- if (paint->hasStage()) {
- if (!paint.writable()->preConcatSamplerMatricesWithInverse(fDrawState->getViewMatrix())) {
- GrPrintf("Could not invert matrix\n");
- }
+ if (!am.setIdentity(this, paint.writable())) {
+ GrPrintf("Could not invert matrix\n");
+ return;
}
- am.set(this, GrMatrix::I());
}
// by definition this fills the entire clip, no need for AA
if (paint->isAntiAlias()) {
@@ -1780,7 +1778,9 @@
AutoRenderTarget art(this);
- AutoMatrix avm(this, GrMatrix::I());
+ AutoMatrix am;
+ am.setIdentity(this);
+
SkIRect clearRect;
int scaleFactorX, radiusX;
int scaleFactorY, radiusY;