aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/shadertext3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/shadertext3.cpp')
-rw-r--r--gm/shadertext3.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/gm/shadertext3.cpp b/gm/shadertext3.cpp
index 3c6400d8d6..8aa6e6965c 100644
--- a/gm/shadertext3.cpp
+++ b/gm/shadertext3.cpp
@@ -4,10 +4,10 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-
#include "gm.h"
#include "SkCanvas.h"
#include "SkGradientShader.h"
+#include "SkUnitMappers.h"
namespace skiagm {
@@ -26,8 +26,14 @@ static void makebm(SkBitmap* bm, int w, int h) {
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();