aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-03-10 06:36:49 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-10 06:36:49 -0800
commit150835e779ceb24e2b540f58958cbff2a0ab9942 (patch)
tree8568c6ce6a06133dab5a2c3e13c8e10ea193b387 /samplecode
parent51b56c904140e42c5468f3ce4f792b58318b952a (diff)
sk_sp versions of newWithColorFilter and newWithLocalMatrix
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SamplePatch.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/samplecode/SamplePatch.cpp b/samplecode/SamplePatch.cpp
index c9ecb70990..3ce350ac47 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);