Index: experimental/SkiaExamples/HelloSkiaExample.cpp |
diff --git a/experimental/SkiaExamples/HelloSkiaExample.cpp b/experimental/SkiaExamples/HelloSkiaExample.cpp |
index 6fd2624c18b0e5e97f9f3ff69b5abfe716f6cbce..0b6c790460eb54900b859e839f73275a0ead41ee 100644 |
--- a/experimental/SkiaExamples/HelloSkiaExample.cpp |
+++ b/experimental/SkiaExamples/HelloSkiaExample.cpp |
@@ -13,6 +13,7 @@ |
#include "SkDraw.h" |
#include "SkGradientShader.h" |
#include "SkGraphics.h" |
+#include "SkUnitMappers.h" |
class HelloSkia : public SkExample { |
public: |
@@ -49,9 +50,12 @@ |
}; |
SkColor linearColors[] = {SK_ColorGREEN, SK_ColorBLACK}; |
+ SkUnitMapper* linearMapper = new SkDiscreteMapper(100); |
+ SkAutoUnref lm_deleter(linearMapper); |
+ |
SkShader* shader = SkGradientShader::CreateLinear( |
linearPoints, linearColors, NULL, 2, |
- SkShader::kMirror_TileMode); |
+ SkShader::kMirror_TileMode, linearMapper); |
SkAutoUnref shader_deleter(shader); |
paint.setShader(shader); |