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

Unified Diff: samplecode/SamplePatch.cpp

Issue 1782703002: sk_sp versions of newWithColorFilter and newWithLocalMatrix (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « include/core/SkShader.h ('k') | src/core/SkBlitter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SamplePatch.cpp
diff --git a/samplecode/SamplePatch.cpp b/samplecode/SamplePatch.cpp
index c9ecb709900da8fa6293d947843763264099420f..3ce350ac478aa6843d06c5c7fa29f19d26b2fda3 100644
--- a/samplecode/SamplePatch.cpp
+++ b/samplecode/SamplePatch.cpp
@@ -289,14 +289,12 @@ protected:
if (true) {
SkMatrix m;
m.setSkew(1, 0);
- SkShader* s = paint.getShader()->newWithLocalMatrix(m);
- paint.setShader(s)->unref();
+ paint.setShader(paint.getShader()->makeWithLocalMatrix(m));
}
if (true) {
SkMatrix m;
m.setRotate(fAngle);
- SkShader* s = paint.getShader()->newWithLocalMatrix(m);
- paint.setShader(s)->unref();
+ paint.setShader(paint.getShader()->makeWithLocalMatrix(m));
}
patch.setBounds(fSize1.fX, fSize1.fY);
drawpatches(canvas, paint, nu, nv, &patch);
« no previous file with comments | « include/core/SkShader.h ('k') | src/core/SkBlitter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698