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

Unified Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 1425013003: Remove GrGLProcessor and create GrGLSLTextureSampler class. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove grglprocessor from gyp Created 5 years, 2 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/gl/builders/GrGLProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLShaderBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index b74a8673cd35a6051b2e8a0c5ca01874365e1731..2afd3c4ab4959d01d558a563b9ea3f9e4725dd23 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -20,6 +20,7 @@
#include "gl/GrGLXferProcessor.h"
#include "glsl/GrGLSLCaps.h"
#include "glsl/GrGLSLProgramDataManager.h"
+#include "glsl/GrGLSLTextureSampler.h"
#define GL_CALL(X) GR_GL_CALL(this->gpu()->glInterface(), X)
#define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->gpu()->glInterface(), R, X)
@@ -279,7 +280,7 @@ void GrGLProgramBuilder::emitAndInstallProc(const GrFragmentProcessor& fp,
ifp->fGLProc.reset(fp.createGLInstance());
- SkSTArray<4, GrGLProcessor::TextureSampler> samplers(fp.numTextures());
+ SkSTArray<4, GrGLSLTextureSampler> samplers(fp.numTextures());
this->emitSamplers(fp, &samplers, ifp);
GrGLFragmentProcessor::EmitArgs args(this, fp, outColor, inColor, fOutCoords[index], samplers);
@@ -299,7 +300,7 @@ void GrGLProgramBuilder::emitAndInstallProc(const GrPrimitiveProcessor& gp,
fGeometryProcessor->fGLProc.reset(gp.createGLInstance(*fGpu->glCaps().glslCaps()));
- SkSTArray<4, GrGLProcessor::TextureSampler> samplers(gp.numTextures());
+ SkSTArray<4, GrGLSLTextureSampler> samplers(gp.numTextures());
this->emitSamplers(gp, &samplers, fGeometryProcessor);
GrGLGeometryProcessor::EmitArgs args(this, gp, outColor, outCoverage, samplers,
@@ -335,7 +336,7 @@ void GrGLProgramBuilder::emitAndInstallXferProc(const GrXferProcessor& xp,
openBrace.printf("{ // Xfer Processor: %s\n", xp.name());
fFS.codeAppend(openBrace.c_str());
- SkSTArray<4, GrGLProcessor::TextureSampler> samplers(xp.numTextures());
+ SkSTArray<4, GrGLSLTextureSampler> samplers(xp.numTextures());
this->emitSamplers(xp, &samplers, fXferProcessor);
GrGLXferProcessor::EmitArgs args(this, xp, colorIn.c_str(), coverageIn.c_str(),
@@ -363,7 +364,7 @@ void GrGLProgramBuilder::verify(const GrFragmentProcessor& fp) {
template <class Proc>
void GrGLProgramBuilder::emitSamplers(const GrProcessor& processor,
- GrGLProcessor::TextureSamplerArray* outSamplers,
+ GrGLSLTextureSampler::TextureSamplerArray* outSamplers,
GrGLInstalledProc<Proc>* ip) {
SkDEBUGCODE(ip->fSamplersIdx = fSamplerUniforms.count();)
int numTextures = processor.numTextures();
@@ -374,7 +375,7 @@ void GrGLProgramBuilder::emitSamplers(const GrProcessor& processor,
localSamplerUniforms[t] = this->addUniform(GrGLProgramBuilder::kFragment_Visibility,
kSampler2D_GrSLType, kDefault_GrSLPrecision,
name.c_str());
- SkNEW_APPEND_TO_TARRAY(outSamplers, GrGLProcessor::TextureSampler,
+ SkNEW_APPEND_TO_TARRAY(outSamplers, GrGLSLTextureSampler,
(localSamplerUniforms[t], processor.textureAccess(t)));
}
}
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698