aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/gradients/SkSweepGradient.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-26 13:01:20 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-26 13:01:20 +0000
commit08283afc265f1153834256fc1012519813ba6b73 (patch)
tree553cfc58076746c1326f88b23dc814f42457be87 /src/effects/gradients/SkSweepGradient.cpp
parent27b40e9f36f567a57ae92860052b36cedacdd4fd (diff)
Rename GrSamplerState to GrEffectStage.
R=robertphillips@google.com Review URL: https://codereview.appspot.com/6777053 git-svn-id: http://skia.googlecode.com/svn/trunk@6135 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects/gradients/SkSweepGradient.cpp')
-rw-r--r--src/effects/gradients/SkSweepGradient.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index 190da5973c..c606bbaca6 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -443,12 +443,12 @@ GrEffect* GrSweepGradient::TestCreate(SkRandom* random,
int colorCount = RandomGradientParams(random, colors, &stops, &tmIgnored);
SkAutoTUnref<SkShader> shader(SkGradientShader::CreateSweep(center.fX, center.fY,
colors, stops, colorCount));
- GrSamplerState sampler;
- shader->asNewEffect(context, &sampler);
- GrAssert(NULL != sampler.getEffect());
+ GrEffectStage stage;
+ shader->asNewEffect(context, &stage);
+ GrAssert(NULL != stage.getEffect());
// const_cast and ref is a hack! Will remove when asNewEffect returns GrEffect*
- sampler.getEffect()->ref();
- return const_cast<GrEffect*>(sampler.getEffect());
+ stage.getEffect()->ref();
+ return const_cast<GrEffect*>(stage.getEffect());
}
/////////////////////////////////////////////////////////////////////
@@ -465,7 +465,7 @@ void GrGLSweepGradient::emitFS(GrGLShaderBuilder* builder,
/////////////////////////////////////////////////////////////////////
-bool SkSweepGradient::asNewEffect(GrContext* context, GrSamplerState* sampler) const {
+bool SkSweepGradient::asNewEffect(GrContext* context, GrEffectStage* stage) const {
SkAutoTUnref<GrEffect> effect(SkNEW_ARGS(GrSweepGradient, (context, *this)));
SkMatrix matrix;
@@ -474,9 +474,9 @@ bool SkSweepGradient::asNewEffect(GrContext* context, GrSamplerState* sampler) c
return false;
}
matrix.postConcat(fPtsToUnit);
- sampler->setEffect(effect, matrix);
+ stage->setEffect(effect, matrix);
} else {
- sampler->setEffect(effect, fPtsToUnit);
+ stage->setEffect(effect, fPtsToUnit);
}
return true;
@@ -484,7 +484,7 @@ bool SkSweepGradient::asNewEffect(GrContext* context, GrSamplerState* sampler) c
#else
-bool SkSweepGradient::asNewEffect(GrContext*, GrSamplerState*) const {
+bool SkSweepGradient::asNewEffect(GrContext*, GrEffectStage*) const {
SkDEBUGFAIL("Should not call in GPU-less build");
return false;
}