Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: src/gpu/effects/GrTextureDomain.cpp

Issue 1251173002: Added GrGLFragmentProcessor::EmitArgs struct for use with emitCode() (Closed) Base URL: https://skia.googlesource.com/skia@composeshader_gpu
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/effects/GrYUVtoRGBEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrTextureDomain.cpp
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 1ebbea8303f38cec43c931cdd3fc4229ab3b7be7..bbc5dc9faab16dc177422a2f043708a1c336ad5e 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -174,12 +174,7 @@ class GrGLTextureDomainEffect : public GrGLFragmentProcessor {
public:
GrGLTextureDomainEffect(const GrProcessor&);
- virtual void emitCode(GrGLFPBuilder*,
- const GrFragmentProcessor&,
- const char* outputColor,
- const char* inputColor,
- const TransformedCoordsArray&,
- const TextureSamplerArray&) override;
+ virtual void emitCode(EmitArgs&) override;
void setData(const GrGLProgramDataManager&, const GrProcessor&) override;
@@ -193,18 +188,14 @@ private:
GrGLTextureDomainEffect::GrGLTextureDomainEffect(const GrProcessor&) {
}
-void GrGLTextureDomainEffect::emitCode(GrGLFPBuilder* builder,
- const GrFragmentProcessor& fp,
- const char* outputColor,
- const char* inputColor,
- const TransformedCoordsArray& coords,
- const TextureSamplerArray& samplers) {
- const GrTextureDomainEffect& textureDomainEffect = fp.cast<GrTextureDomainEffect>();
+void GrGLTextureDomainEffect::emitCode(EmitArgs& args) {
+ const GrTextureDomainEffect& textureDomainEffect = args.fFp.cast<GrTextureDomainEffect>();
const GrTextureDomain& domain = textureDomainEffect.textureDomain();
- GrGLFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
- SkString coords2D = fsBuilder->ensureFSCoords2D(coords, 0);
- fGLDomain.sampleTexture(fsBuilder, domain, outputColor, coords2D, samplers[0], inputColor);
+ GrGLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder();
+ SkString coords2D = fsBuilder->ensureFSCoords2D(args.fCoords, 0);
+ fGLDomain.sampleTexture(fsBuilder, domain, args.fOutputColor, coords2D, args.fSamplers[0],
+ args.fInputColor);
}
void GrGLTextureDomainEffect::setData(const GrGLProgramDataManager& pdman,
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/effects/GrYUVtoRGBEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698