commit | 150835e779ceb24e2b540f58958cbff2a0ab9942 | [log] [tgz] |
---|---|---|
author | reed <reed@google.com> | Thu Mar 10 06:36:49 2016 -0800 |
committer | Commit bot <commit-bot@chromium.org> | Thu Mar 10 06:36:49 2016 -0800 |
tree | 8568c6ce6a06133dab5a2c3e13c8e10ea193b387 | |
parent | 51b56c904140e42c5468f3ce4f792b58318b952a [diff] [blame] |
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
diff --git a/samplecode/SamplePatch.cpp b/samplecode/SamplePatch.cpp index c9ecb70..3ce350a 100644 --- a/samplecode/SamplePatch.cpp +++ b/samplecode/SamplePatch.cpp
@@ -289,14 +289,12 @@ 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);