aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-22 12:27:41 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-22 12:27:41 +0000
commit83f23d87f1d67e6e73873e1ef7cda621c43703a0 (patch)
tree04dcf585fd01896e243efb7ccd8cfc51495e6b5b /bench
parent77767358a3e26693282f9958df6c64df68b65676 (diff)
Remove unused (by clients) SkUnitMapper
This reverts commit 874423a81b5bc2541c7397e6ab00d5e7c9fdaf98. TBR=scroggo Author: reed@google.com Review URL: https://codereview.chromium.org/288313009 git-svn-id: http://skia.googlecode.com/svn/trunk@14842 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench')
-rw-r--r--bench/GradientBench.cpp47
1 files changed, 18 insertions, 29 deletions
diff --git a/bench/GradientBench.cpp b/bench/GradientBench.cpp
index 55e777d8fb..fa07bce4fd 100644
--- a/bench/GradientBench.cpp
+++ b/bench/GradientBench.cpp
@@ -13,7 +13,6 @@
#include "SkPaint.h"
#include "SkShader.h"
#include "SkString.h"
-#include "SkUnitMapper.h"
struct GradData {
int fCount;
@@ -45,38 +44,33 @@ static const GradData gGradData[] = {
/// Ignores scale
static SkShader* MakeLinear(const SkPoint pts[2], const GradData& data,
- SkShader::TileMode tm, SkUnitMapper* mapper,
- float scale) {
- return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos,
- data.fCount, tm, mapper);
+ SkShader::TileMode tm, float scale) {
+ return SkGradientShader::CreateLinear(pts, data.fColors, data.fPos, data.fCount, tm);
}
static SkShader* MakeRadial(const SkPoint pts[2], const GradData& data,
- SkShader::TileMode tm, SkUnitMapper* mapper,
- float scale) {
+ SkShader::TileMode tm, float scale) {
SkPoint center;
center.set(SkScalarAve(pts[0].fX, pts[1].fX),
SkScalarAve(pts[0].fY, pts[1].fY));
return SkGradientShader::CreateRadial(center, center.fX * scale,
data.fColors,
- data.fPos, data.fCount, tm, mapper);
+ data.fPos, data.fCount, tm);
}
/// Ignores scale
static SkShader* MakeSweep(const SkPoint pts[2], const GradData& data,
- SkShader::TileMode tm, SkUnitMapper* mapper,
- float scale) {
+ SkShader::TileMode tm, float scale) {
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);
+ data.fPos, data.fCount);
}
/// Ignores scale
static SkShader* Make2Radial(const SkPoint pts[2], const GradData& data,
- SkShader::TileMode tm, SkUnitMapper* mapper,
- float scale) {
+ SkShader::TileMode tm, float scale) {
SkPoint center0, center1;
center0.set(SkScalarAve(pts[0].fX, pts[1].fX),
SkScalarAve(pts[0].fY, pts[1].fY));
@@ -85,13 +79,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);
}
/// Ignores scale
static SkShader* MakeConical(const SkPoint pts[2], const GradData& data,
- SkShader::TileMode tm, SkUnitMapper* mapper,
- float scale) {
+ SkShader::TileMode tm, float scale) {
SkPoint center0, center1;
center0.set(SkScalarAve(pts[0].fX, pts[1].fX),
SkScalarAve(pts[0].fY, pts[1].fY));
@@ -99,13 +92,12 @@ static SkShader* MakeConical(const SkPoint pts[2], const GradData& data,
SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4));
return SkGradientShader::CreateTwoPointConical(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);
}
/// Ignores scale
static SkShader* MakeConicalZeroRad(const SkPoint pts[2], const GradData& data,
- SkShader::TileMode tm, SkUnitMapper* mapper,
- float scale) {
+ SkShader::TileMode tm, float scale) {
SkPoint center0, center1;
center0.set(SkScalarAve(pts[0].fX, pts[1].fX),
SkScalarAve(pts[0].fY, pts[1].fY));
@@ -113,13 +105,12 @@ static SkShader* MakeConicalZeroRad(const SkPoint pts[2], const GradData& data,
SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4));
return SkGradientShader::CreateTwoPointConical(center1, 0.0,
center0, (pts[1].fX - pts[0].fX) / 2,
- data.fColors, data.fPos, data.fCount, tm, mapper);
+ data.fColors, data.fPos, data.fCount, tm);
}
/// Ignores scale
static SkShader* MakeConicalOutside(const SkPoint pts[2], const GradData& data,
- SkShader::TileMode tm, SkUnitMapper* mapper,
- float scale) {
+ SkShader::TileMode tm, float scale) {
SkPoint center0, center1;
SkScalar radius0 = SkScalarDiv(pts[1].fX - pts[0].fX, 10);
SkScalar radius1 = SkScalarDiv(pts[1].fX - pts[0].fX, 3);
@@ -128,13 +119,12 @@ static SkShader* MakeConicalOutside(const SkPoint pts[2], const GradData& data,
return SkGradientShader::CreateTwoPointConical(center0, radius0,
center1, radius1,
data.fColors, data.fPos,
- data.fCount, tm, mapper);
+ data.fCount, tm);
}
/// Ignores scale
static SkShader* MakeConicalOutsideZeroRad(const SkPoint pts[2], const GradData& data,
- SkShader::TileMode tm, SkUnitMapper* mapper,
- float scale) {
+ SkShader::TileMode tm, float scale) {
SkPoint center0, center1;
SkScalar radius0 = SkScalarDiv(pts[1].fX - pts[0].fX, 10);
SkScalar radius1 = SkScalarDiv(pts[1].fX - pts[0].fX, 3);
@@ -143,12 +133,11 @@ static SkShader* MakeConicalOutsideZeroRad(const SkPoint pts[2], const GradData&
return SkGradientShader::CreateTwoPointConical(center0, 0.0,
center1, radius1,
data.fColors, data.fPos,
- data.fCount, tm, mapper);
+ data.fCount, tm);
}
typedef SkShader* (*GradMaker)(const SkPoint pts[2], const GradData& data,
- SkShader::TileMode tm, SkUnitMapper* mapper,
- float scale);
+ SkShader::TileMode tm, float scale);
static const struct {
GradMaker fMaker;
@@ -240,7 +229,7 @@ public:
{ SkIntToScalar(W), SkIntToScalar(H) }
};
- fShader = gGrads[gradType].fMaker(pts, data, tm, NULL, scale);
+ fShader = gGrads[gradType].fMaker(pts, data, tm, scale);
fGeomType = geomType;
}