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

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

Issue 1457543003: Add ShaderBuilders to EmitArgs and remove gettings from ProgBuilder. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/GrXfermodeFragmentProcessor.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrYUVtoRGBEffect.cpp
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp
index 58b9a0fd66ec5f6a35e61d4e4933d9814d89f2d6..6d1c864b82cd9ebb9b5949b7912bf3ca19920ab4 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.cpp
+++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp
@@ -64,22 +64,22 @@ public:
GLSLProcessor(const GrProcessor&) {}
virtual void emitCode(EmitArgs& args) override {
- GrGLSLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder();
+ GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder;
const char* yuvMatrix = nullptr;
fMatrixUni = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
kMat44f_GrSLType, kDefault_GrSLPrecision,
"YUVMatrix", &yuvMatrix);
- fsBuilder->codeAppendf("\t%s = vec4(\n\t\t", args.fOutputColor);
- fsBuilder->appendTextureLookup(args.fSamplers[0], args.fCoords[0].c_str(),
- args.fCoords[0].getType());
- fsBuilder->codeAppend(".r,\n\t\t");
- fsBuilder->appendTextureLookup(args.fSamplers[1], args.fCoords[1].c_str(),
- args.fCoords[1].getType());
- fsBuilder->codeAppend(".r,\n\t\t");
- fsBuilder->appendTextureLookup(args.fSamplers[2], args.fCoords[2].c_str(),
- args.fCoords[2].getType());
- fsBuilder->codeAppendf(".r,\n\t\t1.0) * %s;\n", yuvMatrix);
+ fragBuilder->codeAppendf("\t%s = vec4(\n\t\t", args.fOutputColor);
+ fragBuilder->appendTextureLookup(args.fSamplers[0], args.fCoords[0].c_str(),
+ args.fCoords[0].getType());
+ fragBuilder->codeAppend(".r,\n\t\t");
+ fragBuilder->appendTextureLookup(args.fSamplers[1], args.fCoords[1].c_str(),
+ args.fCoords[1].getType());
+ fragBuilder->codeAppend(".r,\n\t\t");
+ fragBuilder->appendTextureLookup(args.fSamplers[2], args.fCoords[2].c_str(),
+ args.fCoords[2].getType());
+ fragBuilder->codeAppendf(".r,\n\t\t1.0) * %s;\n", yuvMatrix);
}
protected:
« no previous file with comments | « src/gpu/effects/GrXfermodeFragmentProcessor.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698