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

Unified Diff: gm/glyph_pos_align.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/giantbitmap.cpp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/glyph_pos_align.cpp
diff --git a/gm/glyph_pos_align.cpp b/gm/glyph_pos_align.cpp
index e80955e1acc91d121b1ed663a1e2bc904db71cec..0ac877d0d0a2d3855e98b847bd2ea6185f448cc3 100644
--- a/gm/glyph_pos_align.cpp
+++ b/gm/glyph_pos_align.cpp
@@ -25,12 +25,8 @@ DEF_SIMPLE_GM_BG(glyph_pos_align, canvas, kWidth, kHeight, SK_ColorBLACK) {
paint.setFakeBoldText(true);
const SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE };
const SkPoint pts[] = {{0, 0}, {kWidth, kHeight}};
- SkAutoTUnref<SkShader> grad(SkGradientShader::CreateLinear(pts, colors, nullptr,
- SK_ARRAY_COUNT(colors),
- SkShader::kMirror_TileMode));
- paint.setShader(grad);
-
-
+ paint.setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
+ SkShader::kMirror_TileMode));
paint.setTextAlign(SkPaint::kRight_Align);
drawTestCase(canvas, "Right Align", kTextHeight, paint);
« no previous file with comments | « gm/giantbitmap.cpp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698