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

Unified Diff: samplecode/SampleEmboss.cpp

Issue 1829303002: move setshader to sk_sp (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
Index: samplecode/SampleEmboss.cpp
diff --git a/samplecode/SampleEmboss.cpp b/samplecode/SampleEmboss.cpp
index 6e33e05e794e2bb65eb968035bf1b0c0f3862538..215a1e07d2f00a3378fcef0fa75b4df3480b1c7e 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),

Powered by Google App Engine
This is Rietveld 408576698