aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/gradients/SkLinearGradient.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-18 14:14:49 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-18 14:14:49 +0000
commit1ce49fc91714ce8974d11246d29ebe7b97b5fe98 (patch)
tree4e389ac0bcd225ccacf1ef0ef21c4266567c30dd /src/effects/gradients/SkLinearGradient.cpp
parent10f9f4a844c8d5260c0a02df94b940b6abf66b0d (diff)
Move GrTextureParams from GrSamplerState to GrTextureAccess
Review URL: https://codereview.appspot.com/6496135/ git-svn-id: http://skia.googlecode.com/svn/trunk@5582 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects/gradients/SkLinearGradient.cpp')
-rw-r--r--src/effects/gradients/SkLinearGradient.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index bcebc26830..4b673f6691 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -503,9 +503,8 @@ private:
class GrLinearGradient : public GrGradientEffect {
public:
- GrLinearGradient(GrContext* ctx, const SkLinearGradient& shader,
- GrSamplerState* sampler)
- : INHERITED(ctx, shader, sampler) { }
+ GrLinearGradient(GrContext* ctx, const SkLinearGradient& shader, SkShader::TileMode tm)
+ : INHERITED(ctx, shader, tm) { }
virtual ~GrLinearGradient() { }
static const char* Name() { return "Linear Gradient"; }
@@ -562,10 +561,7 @@ GrCustomStage* SkLinearGradient::asNewCustomStage(GrContext* context,
GrSamplerState* sampler) const {
SkASSERT(NULL != context && NULL != sampler);
sampler->matrix()->preConcat(fPtsToUnit);
- sampler->textureParams()->setTileModeX(fTileMode);
- sampler->textureParams()->setTileModeY(kClamp_TileMode);
- sampler->textureParams()->setBilerp(true);
- return SkNEW_ARGS(GrLinearGradient, (context, *this, sampler));
+ return SkNEW_ARGS(GrLinearGradient, (context, *this, fTileMode));
}
#else