Index: src/pdf/SkPDFDeviceFlattener.cpp |
diff --git a/src/pdf/SkPDFDeviceFlattener.cpp b/src/pdf/SkPDFDeviceFlattener.cpp |
index aea87f6546aa98a1b24c0d1806484910b2dd53cf..91c9803c320a583c31c262b97a86bbe85cab7f15 100644 |
--- a/src/pdf/SkPDFDeviceFlattener.cpp |
+++ b/src/pdf/SkPDFDeviceFlattener.cpp |
@@ -6,6 +6,7 @@ |
*/ |
#include "SkPDFDeviceFlattener.h" |
+ |
#include "SkDraw.h" |
static SkISize SkSizeToISize(const SkSize& size) { |
@@ -24,9 +25,9 @@ |
static void flattenPaint(const SkDraw& d, SkPaint* paint) { |
if (paint->getShader()) { |
- SkAutoTUnref<SkShader> lms(SkShader::CreateLocalMatrixShader(paint->getShader(), |
- *d.fMatrix)); |
- paint->setShader(lms); |
+ SkMatrix local = paint->getShader()->getLocalMatrix(); |
+ local.preConcat(*d.fMatrix); |
+ paint->getShader()->setLocalMatrix(local); |
} |
} |