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

Unified Diff: samplecode/SampleColorFilter.cpp

Issue 1772463002: use Make instead of Create to return a shared shader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: partial update of skia call-sites 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/SampleColorFilter.cpp
diff --git a/samplecode/SampleColorFilter.cpp b/samplecode/SampleColorFilter.cpp
index af1cd935a2d6811719de08074291a2f2882e9182..4ee8949410e58f72b3b41ee3b962081774eca6f0 100644
--- a/samplecode/SampleColorFilter.cpp
+++ b/samplecode/SampleColorFilter.cpp
@@ -111,7 +111,7 @@ static SkBitmap createBitmap(int n) {
class ColorFilterView : public SampleView {
SkBitmap fBitmap;
- SkShader* fShader;
+ sk_sp<SkShader> fShader;
enum {
N = 64
};
@@ -126,10 +126,6 @@ public:
}
}
- virtual ~ColorFilterView() {
- fShader->unref();
- }
-
protected:
// overrides from SkEventSink
virtual bool onQuery(SkEvent* evt) {

Powered by Google App Engine
This is Rietveld 408576698