Index: gm/tilemodes_scaled.cpp |
diff --git a/gm/tilemodes_scaled.cpp b/gm/tilemodes_scaled.cpp |
index 88a070afb5b627d16a1afd7aab70cdce8bbf0093..a79002b56b31788537da9a7ce7fc823ea6afdac6 100644 |
--- a/gm/tilemodes_scaled.cpp |
+++ b/gm/tilemodes_scaled.cpp |
@@ -17,6 +17,7 @@ |
// effects |
#include "SkGradientShader.h" |
+#include "SkUnitMappers.h" |
#include "SkBlurDrawLooper.h" |
static void makebm(SkBitmap* bm, SkColorType ct, int w, int h) { |
@@ -29,9 +30,16 @@ |
SkScalar pos[] = { 0, SK_Scalar1/2, SK_Scalar1 }; |
SkPaint paint; |
+ SkUnitMapper* um = NULL; |
+ |
+ um = new SkCosineMapper; |
+// um = new SkDiscreteMapper(12); |
+ |
+ SkAutoUnref au(um); |
+ |
paint.setDither(true); |
paint.setShader(SkGradientShader::CreateLinear(pts, colors, pos, |
- SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode))->unref(); |
+ SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode, um))->unref(); |
canvas.drawPaint(paint); |
} |