Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: src/pdf/SkPDFDeviceFlattener.cpp

Issue 279903002: reland hide get/setLocalMatrix (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remember global initialization of flattenables Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
}

Powered by Google App Engine
This is Rietveld 408576698