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

Unified Diff: src/pdf/SkPDFDeviceFlattener.cpp

Issue 278903002: Revert of 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 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);
}
}
« 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