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

Unified Diff: src/pdf/SkPDFDeviceFlattener.cpp

Issue 279563002: hide get/setLocalMatrix (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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
« no previous file with comments | « src/effects/SkRectShaderImageFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « src/effects/SkRectShaderImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698