Fix build break after r7411 when GR_STATIC_RECT_VB is enabled.
authorbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 28 Jan 2013 16:46:55 +0000 (16:46 +0000)
committerbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 28 Jan 2013 16:46:55 +0000 (16:46 +0000)
Review URL: https://codereview.appspot.com/7220051

git-svn-id: http://skia.googlecode.com/svn/trunk@7415 2bbb7eff-a529-9590-31e7-b0007b416f81

src/gpu/GrContext.cpp
src/gpu/GrDrawState.h

index 20d47c2..fdeb15c 100644 (file)
@@ -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) {
index 326df0b..e70c38f 100644 (file)
@@ -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);
             }
         }