diff --git a/gm/shapes.cpp b/gm/shapes.cpp index 324ce7e87..5daea0aa4 100644 --- a/gm/shapes.cpp +++ b/gm/shapes.cpp @@ -57,6 +57,8 @@ public: for (size_t i = 0; i < SK_ARRAY_COUNT(fMatrixRefs); i++) { SkSafeRef(fMatrixRefs[i] = fGroup.getShapeMatrixRef(i)); } + SkScalar c = SkIntToScalar(50); + fMatrixRefs[3]->preRotate(SkIntToScalar(30), c, c); } virtual ~ShapesGM() { @@ -81,10 +83,6 @@ protected: virtual void onDraw(SkCanvas* canvas) { this->drawBG(canvas); - SkMatrix saveM = *fMatrixRefs[3]; - SkScalar c = SkIntToScalar(50); - fMatrixRefs[3]->preRotate(SkIntToScalar(30), c, c); - SkMatrix matrix; SkGroupShape* gs = new SkGroupShape; @@ -111,8 +109,6 @@ protected: canvas->drawPicture(*pict); pict->unref(); #endif - - *fMatrixRefs[3] = saveM; } private: