diff options
| author | reed <reed@google.com> | 2016-03-25 09:08:00 -0700 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2016-03-25 09:08:00 -0700 |
| commit | fe63045f075165b1be5d3e7fc5c710021d85f53b (patch) | |
| tree | c60f764504ba1d622613a432c88e43f7f65c0fec /samplecode/SampleEmboss.cpp | |
| parent | cce49271124ff75c880dc0dfed1489f02c82890b (diff) | |
move setshader to sk_sp, re-using SK_SUPPORT_LEGACY_CREATESHADER_PTR
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1829303002
Review URL: https://codereview.chromium.org/1829303002
Diffstat (limited to 'samplecode/SampleEmboss.cpp')
| -rw-r--r-- | samplecode/SampleEmboss.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/samplecode/SampleEmboss.cpp b/samplecode/SampleEmboss.cpp index 6e33e05e79..215a1e07d2 100644 --- a/samplecode/SampleEmboss.cpp +++ b/samplecode/SampleEmboss.cpp @@ -9,7 +9,6 @@ #include "SkBlurMask.h" #include "SkView.h" #include "SkCanvas.h" -#include "SkColorShader.h" #include "SkEmbossMaskFilter.h" #include "SkGradientShader.h" #include "SkGraphics.h" @@ -53,7 +52,7 @@ protected: paint.setStrokeWidth(SkIntToScalar(10)); paint.setMaskFilter(SkEmbossMaskFilter::Create( SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(4)), fLight))->unref(); - paint.setShader(new SkColorShader(SK_ColorBLUE))->unref(); + paint.setShader(SkShader::MakeColorShader(SK_ColorBLUE)); paint.setDither(true); canvas->drawCircle(SkIntToScalar(50), SkIntToScalar(50), |
