aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrSimpleTextureEffect.cpp
diff options
context:
space:
mode:
authorGravatar wangyix <wangyix@google.com>2015-07-22 15:08:53 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-22 15:08:53 -0700
commit7c157a988845fb00f9024d6db6dda142c3458033 (patch)
tree3a3523e91c6ec7501afd200d5402ba41347a73f8 /src/gpu/effects/GrSimpleTextureEffect.cpp
parent243406e5800ad4ff296da8d4cb30d0a33d6f7b2a (diff)
Added GrGLFragmentProcessor::EmitArgs struct for use with emitCode()
Diffstat (limited to 'src/gpu/effects/GrSimpleTextureEffect.cpp')
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index 8e6243dca0..066ccf7991 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -17,18 +17,13 @@ class GrGLSimpleTextureEffect : public GrGLFragmentProcessor {
public:
GrGLSimpleTextureEffect(const GrProcessor&) {}
- virtual void emitCode(GrGLFPBuilder* builder,
- const GrFragmentProcessor& fp,
- const char* outputColor,
- const char* inputColor,
- const TransformedCoordsArray& coords,
- const TextureSamplerArray& samplers) override {
- GrGLFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
- fsBuilder->codeAppendf("\t%s = ", outputColor);
- fsBuilder->appendTextureLookupAndModulate(inputColor,
- samplers[0],
- coords[0].c_str(),
- coords[0].getType());
+ virtual void emitCode(EmitArgs& args) override {
+ GrGLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder();
+ fsBuilder->codeAppendf("\t%s = ", args.fOutputColor);
+ fsBuilder->appendTextureLookupAndModulate(args.fInputColor,
+ args.fSamplers[0],
+ args.fCoords[0].c_str(),
+ args.fCoords[0].getType());
fsBuilder->codeAppend(";\n");
}