diff options
author | 2016-03-10 06:36:49 -0800 | |
---|---|---|
committer | 2016-03-10 06:36:49 -0800 | |
commit | 150835e779ceb24e2b540f58958cbff2a0ab9942 (patch) | |
tree | 8568c6ce6a06133dab5a2c3e13c8e10ea193b387 /samplecode | |
parent | 51b56c904140e42c5468f3ce4f792b58318b952a (diff) |
sk_sp versions of newWithColorFilter and newWithLocalMatrix
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1782703002
Review URL: https://codereview.chromium.org/1782703002
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SamplePatch.cpp | 6 |
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); |