aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrContext.cpp2
-rw-r--r--src/gpu/GrDrawState.h8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 20d47c28a0..fdeb15cf1d 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -837,7 +837,7 @@ void GrContext::drawRectToRect(const GrPaint& paint,
m.postConcat(*srcMatrix);
}
- drawState->stage(GrPaint::kFirstColorStage)->preConcatCoordChange(m);
+ drawState->preConcatStageMatrices(kExplicitCoordMask, m);
const GrVertexBuffer* sqVB = fGpu->getUnitSquareVertexBuffer();
if (NULL == sqVB) {
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index 326df0bf95..e70c38f154 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -255,8 +255,14 @@ public:
* old coord system to the new coord system.
*/
void preConcatStageMatrices(const SkMatrix& preConcat) {
+ this->preConcatStageMatrices(~0U, preConcat);
+ }
+ /**
+ * Version of above that applies the update matrix selectively to stages via a mask.
+ */
+ void preConcatStageMatrices(uint32_t stageMask, const SkMatrix& preConcat) {
for (int i = 0; i < kNumStages; ++i) {
- if (this->isStageEnabled(i)) {
+ if (((1 << i) & stageMask) && this->isStageEnabled(i)) {
fStages[i].preConcatCoordChange(preConcat);
}
}