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

Unified Diff: samplecode/SampleAll.cpp

Issue 288313009: 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
Index: samplecode/SampleAll.cpp
diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp
index ea1f14328816fbba47ed2b2655438082621eea07..92fe258dd6a4ed6652e68cc04ca3c1010162ef0f 100644
--- a/samplecode/SampleAll.cpp
+++ b/samplecode/SampleAll.cpp
@@ -36,7 +36,6 @@
#include "SkRandom.h"
#include "SkTransparentShader.h"
#include "SkTypeface.h"
-#include "SkUnitMappers.h"
#include "SkUtils.h"
#include "SkXfermode.h"
@@ -368,10 +367,8 @@ protected:
SkScalar* linearPos = NULL;
int linearCount = 2;
SkShader::TileMode linearMode = SkShader::kMirror_TileMode;
- SkUnitMapper* linearMapper = new SkDiscreteMapper(3);
- SkAutoUnref unmapLinearMapper(linearMapper);
SkShader* linear = SkGradientShader::CreateLinear(linearPoints,
- linearColors, linearPos, linearCount, linearMode, linearMapper);
+ linearColors, linearPos, linearCount, linearMode);
SkPoint radialCenter = { SkIntToScalar(25), SkIntToScalar(25) };
SkScalar radialRadius = SkIntToScalar(25);
@@ -379,11 +376,9 @@ protected:
SkScalar radialPos[] = { 0, SkIntToScalar(3) / 5, SkIntToScalar(1)};
int radialCount = 3;
SkShader::TileMode radialMode = SkShader::kRepeat_TileMode;
- SkUnitMapper* radialMapper = new SkCosineMapper();
- SkAutoUnref unmapRadialMapper(radialMapper);
SkShader* radial = SkGradientShader::CreateRadial(radialCenter,
radialRadius, radialColors, radialPos, radialCount,
- radialMode, radialMapper);
+ radialMode);
SkTransparentShader* transparentShader = new SkTransparentShader();
SkEmbossMaskFilter::Light light;

Powered by Google App Engine
This is Rietveld 408576698