Index: gm/gradients.cpp |
diff --git a/gm/gradients.cpp b/gm/gradients.cpp |
index f5abb07efc235e93d9e239d75ffaf519ca9bb6ba..277033b5dd1d368e3f557c81441776ebcda0b66d 100644 |
--- a/gm/gradients.cpp |
+++ b/gm/gradients.cpp |
@@ -40,35 +40,31 @@ static const GradData gGradData[] = { |
}; |
static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data, |
- SkShader::TileMode tm, SkUnitMapper* mapper, |
- const SkMatrix& localMatrix) { |
+ SkShader::TileMode tm, const SkMatrix& localMatrix) { |
return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, |
- data.fCount, tm, mapper, 0, &localMatrix); |
+ data.fCount, tm, 0, &localMatrix); |
} |
static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data, |
- SkShader::TileMode tm, SkUnitMapper* mapper, |
- const SkMatrix& localMatrix) { |
+ SkShader::TileMode tm, const SkMatrix& localMatrix) { |
SkPoint center; |
center.set(SkScalarAve(pts[0].fX, pts[1].fX), |
SkScalarAve(pts[0].fY, pts[1].fY)); |
return SkGradientShader::CreateRadial(center, center.fX, data.fColors, |
- data.fPos, data.fCount, tm, mapper, 0, &localMatrix); |
+ data.fPos, data.fCount, tm, 0, &localMatrix); |
} |
static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data, |
- SkShader::TileMode, SkUnitMapper* mapper, |
- const SkMatrix& localMatrix) { |
+ SkShader::TileMode, const SkMatrix& localMatrix) { |
SkPoint center; |
center.set(SkScalarAve(pts[0].fX, pts[1].fX), |
SkScalarAve(pts[0].fY, pts[1].fY)); |
return SkGradientShader::CreateSweep(center.fX, center.fY, data.fColors, |
- data.fPos, data.fCount, mapper, 0, &localMatrix); |
+ data.fPos, data.fCount, 0, &localMatrix); |
} |
static SkShader* Make2Radial(const SkPoint pts[2], const GradData& data, |
- SkShader::TileMode tm, SkUnitMapper* mapper, |
- const SkMatrix& localMatrix) { |
+ SkShader::TileMode tm, const SkMatrix& localMatrix) { |
SkPoint center0, center1; |
center0.set(SkScalarAve(pts[0].fX, pts[1].fX), |
SkScalarAve(pts[0].fY, pts[1].fY)); |
@@ -77,13 +73,12 @@ static SkShader* Make2Radial(const SkPoint pts[2], const GradData& data, |
return SkGradientShader::CreateTwoPointRadial( |
center1, (pts[1].fX - pts[0].fX) / 7, |
center0, (pts[1].fX - pts[0].fX) / 2, |
- data.fColors, data.fPos, data.fCount, tm, mapper, |
+ data.fColors, data.fPos, data.fCount, tm, |
0, &localMatrix); |
} |
static SkShader* Make2Conical(const SkPoint pts[2], const GradData& data, |
- SkShader::TileMode tm, SkUnitMapper* mapper, |
- const SkMatrix& localMatrix) { |
+ SkShader::TileMode tm, const SkMatrix& localMatrix) { |
SkPoint center0, center1; |
SkScalar radius0 = SkScalarDiv(pts[1].fX - pts[0].fX, 10); |
SkScalar radius1 = SkScalarDiv(pts[1].fX - pts[0].fX, 3); |
@@ -92,13 +87,11 @@ static SkShader* Make2Conical(const SkPoint pts[2], const GradData& data, |
return SkGradientShader::CreateTwoPointConical(center1, radius1, |
center0, radius0, |
data.fColors, data.fPos, |
- data.fCount, tm, mapper, |
- 0, &localMatrix); |
+ data.fCount, tm, 0, &localMatrix); |
} |
typedef SkShader* (*GradMaker)(const SkPoint pts[2], const GradData& data, |
- SkShader::TileMode tm, SkUnitMapper* mapper, |
- const SkMatrix& localMatrix); |
+ SkShader::TileMode tm, const SkMatrix& localMatrix); |
static const GradMaker gGradMakers[] = { |
MakeLinear, MakeRadial, MakeSweep, Make2Radial, Make2Conical |
}; |
@@ -144,7 +137,7 @@ protected: |
scale.postTranslate(25.f, 25.f); |
} |
- SkShader* shader = gGradMakers[j](pts, gGradData[i], tm, NULL, scale); |
+ SkShader* shader = gGradMakers[j](pts, gGradData[i], tm, scale); |
paint.setShader(shader); |
canvas->drawRect(r, paint); |
@@ -202,7 +195,7 @@ protected: |
perspective.setSkewX(SkScalarDiv(SkIntToScalar((unsigned) i+1), |
SkIntToScalar(10))); |
- SkShader* shader = gGradMakers[j](pts, gGradData[i], tm, NULL, perspective); |
+ SkShader* shader = gGradMakers[j](pts, gGradData[i], tm, perspective); |
paint.setShader(shader); |
canvas->drawRect(r, paint); |
@@ -327,7 +320,7 @@ protected: |
SkShader* shader = SkGradientShader::CreateRadial( |
SkPoint(center), |
SkIntToScalar(200), gColors, NULL, 5, |
- SkShader::kClamp_TileMode, NULL); |
+ SkShader::kClamp_TileMode); |
paint.setShader(shader); |
canvas->drawRect(r, paint); |
shader->unref(); |
@@ -422,17 +415,17 @@ protected: |
SkAutoTUnref<SkShader> sweep( |
SkGradientShader::CreateSweep(cx, cy, sweep_colors, |
NULL, SK_ARRAY_COUNT(sweep_colors), |
- NULL, flags[i])); |
+ flags[i], NULL)); |
SkAutoTUnref<SkShader> radial1( |
SkGradientShader::CreateRadial(center, radius, colors1, |
NULL, SK_ARRAY_COUNT(colors1), |
SkShader::kClamp_TileMode, |
- NULL, flags[i])); |
+ flags[i], NULL)); |
SkAutoTUnref<SkShader> radial2( |
SkGradientShader::CreateRadial(center, radius, colors2, |
NULL, SK_ARRAY_COUNT(colors2), |
SkShader::kClamp_TileMode, |
- NULL, flags[i])); |
+ flags[i], NULL)); |
paint1.setShader(sweep); |
paint2.setShader(radial1); |
paint3.setShader(radial2); |