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

Unified Diff: src/pdf/SkPDFDeviceFlattener.cpp

Issue 245963010: Move SkShader::fLocalMatrix into SkShader constructor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add SkLocalMatrixShaderWrapper Created 6 years, 8 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..02f2aa725219380bb4f6ce46f083182757687e8d 100644
--- a/src/pdf/SkPDFDeviceFlattener.cpp
+++ b/src/pdf/SkPDFDeviceFlattener.cpp
@@ -27,7 +27,7 @@ static void flattenPaint(const SkDraw& d, SkPaint* paint) {
if (paint->getShader()) {
SkMatrix local = paint->getShader()->getLocalMatrix();
local.preConcat(*d.fMatrix);
- paint->getShader()->setLocalMatrix(local);
+ paint->setShader(SkShader::CreateLocalMatrixWrapper(paint->getShader(), local));
scroggo 2014/04/24 17:02:53 Don't we need to unref this new shader?
}
}

Powered by Google App Engine
This is Rietveld 408576698