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

Unified Diff: gm/vertices.cpp

Issue 1825073002: Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove flag 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
« no previous file with comments | « gm/tileimagefilter.cpp ('k') | gyp/skia_for_android_framework_defines.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/vertices.cpp
diff --git a/gm/vertices.cpp b/gm/vertices.cpp
index 177dc43c2b7bc83b4d7838defc0cea3bc405cb52..9c4ccc16bb33d04b3bffb4c790f73fd67188b0bf 100644
--- a/gm/vertices.cpp
+++ b/gm/vertices.cpp
@@ -26,17 +26,17 @@ static sk_sp<SkShader> make_shader2() {
return SkShader::MakeColorShader(SK_ColorBLUE);
}
-static SkColorFilter* make_color_filter() {
- return SkColorFilter::CreateModeFilter(0xFFAABBCC, SkXfermode::kDarken_Mode);
+static sk_sp<SkColorFilter> make_color_filter() {
+ return SkColorFilter::MakeModeFilter(0xFFAABBCC, SkXfermode::kDarken_Mode);
}
class VerticesGM : public skiagm::GM {
- SkPoint fPts[9];
- SkPoint fTexs[9];
- SkColor fColors[9];
- sk_sp<SkShader> fShader1;
- sk_sp<SkShader> fShader2;
- SkAutoTUnref<SkColorFilter> fColorFilter;
+ SkPoint fPts[9];
+ SkPoint fTexs[9];
+ SkColor fColors[9];
+ sk_sp<SkShader> fShader1;
+ sk_sp<SkShader> fShader2;
+ sk_sp<SkColorFilter> fColorFilter;
public:
VerticesGM() {}
@@ -60,7 +60,7 @@ protected:
fShader1 = make_shader1(w, h);
fShader2 = make_shader2();
- fColorFilter.reset(make_color_filter());
+ fColorFilter = make_color_filter();
SkRandom rand;
for (size_t i = 0; i < SK_ARRAY_COUNT(fColors); ++i) {
@@ -85,11 +85,11 @@ protected:
};
const struct {
- const SkColor* fColors;
- const SkPoint* fTexs;
- const sk_sp<SkShader>& fShader;
- SkColorFilter* fColorFilter;
- uint8_t fAlpha;
+ const SkColor* fColors;
+ const SkPoint* fTexs;
+ const sk_sp<SkShader>& fShader;
+ const sk_sp<SkColorFilter>& fColorFilter;
+ uint8_t fAlpha;
} rec[] = {
{ fColors, nullptr, fShader1, nullptr , 0xFF },
{ nullptr, fTexs , fShader1, nullptr , 0xFF },
« no previous file with comments | « gm/tileimagefilter.cpp ('k') | gyp/skia_for_android_framework_defines.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698