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

Unified Diff: gm/shadertext2.cpp

Issue 287063009: Revert of remove unused (by clients) SkUnitMapper (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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/shadertext.cpp ('k') | gm/shadertext3.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/shadertext2.cpp
diff --git a/gm/shadertext2.cpp b/gm/shadertext2.cpp
index 27b517517e5153bcda4ffaecf5d658b33695e497..d6a9a721cd4fe577a4f5540389cd1d72c8da618d 100644
--- a/gm/shadertext2.cpp
+++ b/gm/shadertext2.cpp
@@ -7,6 +7,7 @@
#include "gm.h"
#include "SkCanvas.h"
#include "SkGradientShader.h"
+#include "SkUnitMappers.h"
namespace skiagm {
@@ -25,8 +26,14 @@
SkPaint paint;
+ SkUnitMapper* um = NULL;
+
+ um = new SkCosineMapper;
+
+ SkAutoUnref au(um);
+
paint.setShader(SkGradientShader::CreateLinear(kPts0, kColors0, kPos,
- SK_ARRAY_COUNT(kColors0), SkShader::kClamp_TileMode))->unref();
+ SK_ARRAY_COUNT(kColors0), SkShader::kClamp_TileMode, um))->unref();
canvas.drawPaint(paint);
paint.setShader(SkGradientShader::CreateLinear(kPts1, kColors1, kPos,
SK_ARRAY_COUNT(kColors1), SkShader::kClamp_TileMode))->unref();
« no previous file with comments | « gm/shadertext.cpp ('k') | gm/shadertext3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698