aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/SkiaExamples/HelloSkiaExample.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-22 02:55:59 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-22 02:55:59 +0000
commit3339ac54a5ed75f2872ab16e9052a8b9ff3564bf (patch)
tree42852098db6117ad0f15cf332bc2aacffa322e38 /experimental/SkiaExamples/HelloSkiaExample.cpp
parent8991c67f0c1b9364bb12dfb0f32a53bd5a3357f3 (diff)
Reason for revert: required blink change failed to land Original issue's description: > Remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/) > > This reverts commit dd50c83b5b34dab3a077741861b50ed1f2bc6b8f. > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=14830 R=scroggo@google.com, reed@google.com TBR=reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@chromium.org Review URL: https://codereview.chromium.org/296823008 git-svn-id: http://skia.googlecode.com/svn/trunk@14838 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/SkiaExamples/HelloSkiaExample.cpp')
-rw-r--r--experimental/SkiaExamples/HelloSkiaExample.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/experimental/SkiaExamples/HelloSkiaExample.cpp b/experimental/SkiaExamples/HelloSkiaExample.cpp
index 6fd2624c18..0b6c790460 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 @@ protected:
};
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);