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

Unified Diff: gm/colortype.cpp

Issue 1776973003: partial switch over to sp usage of shaders (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move into lua container 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/colormatrix.cpp ('k') | gm/colortypexfermode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/colortype.cpp
diff --git a/gm/colortype.cpp b/gm/colortype.cpp
index 76b13817a945452e369a50075e6a95e7ca2ef8f4..c9314de2a456479eecd88b92fcd3cec6c41ac9e1 100644
--- a/gm/colortype.cpp
+++ b/gm/colortype.cpp
@@ -28,15 +28,12 @@ protected:
};
SkMatrix local;
local.setRotate(180);
- SkShader* s = SkGradientShader::CreateSweep(0,0, colors, nullptr,
- SK_ARRAY_COUNT(colors), 0, &local);
-
SkPaint paint;
paint.setAntiAlias(true);
- paint.setShader(s)->unref();
+ paint.setShader(SkGradientShader::MakeSweep(0, 0, colors, nullptr, SK_ARRAY_COUNT(colors),
+ 0, &local));
- SkTypeface* orig = sk_tool_utils::create_portable_typeface("serif",
- SkTypeface::kBold);
+ SkTypeface* orig = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kBold);
if (nullptr == orig) {
orig = SkTypeface::RefDefault();
}
« no previous file with comments | « gm/colormatrix.cpp ('k') | gm/colortypexfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698