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