| Index: src/gpu/gl/GrGLProgramDataManager.cpp
|
| diff --git a/src/gpu/gl/GrGLProgramDataManager.cpp b/src/gpu/gl/GrGLProgramDataManager.cpp
|
| index c53abd79abe3a3774129c8aff17b75201e556a19..f8d996b542e0cd8c11f33dd27bebb5fc73f67a4e 100644
|
| --- a/src/gpu/gl/GrGLProgramDataManager.cpp
|
| +++ b/src/gpu/gl/GrGLProgramDataManager.cpp
|
| @@ -5,9 +5,7 @@
|
| * found in the LICENSE file.
|
| */
|
|
|
| -#include "gl/builders/GrGLProgramBuilder.h"
|
| #include "gl/GrGLPathRendering.h"
|
| -#include "gl/GrGLProgram.h"
|
| #include "gl/GrGLUniformHandle.h"
|
| #include "gl/GrGpuGL.h"
|
| #include "SkMatrix.h"
|
| @@ -16,16 +14,13 @@
|
| SkASSERT(arrayCount <= uni.fArrayCount || \
|
| (1 == arrayCount && GrGLShaderVar::kNonArray == uni.fArrayCount))
|
|
|
| -GrGLProgramDataManager::GrGLProgramDataManager(GrGpuGL* gpu,
|
| - GrGLProgram* program,
|
| - const GrGLProgramBuilder& builder)
|
| - : fGpu(gpu),
|
| - fProgram(program) {
|
| - int count = builder.getUniformInfos().count();
|
| +GrGLProgramDataManager::GrGLProgramDataManager(GrGpuGL* gpu, const UniformInfoArray& uniforms)
|
| + : fGpu(gpu) {
|
| + int count = uniforms.count();
|
| fUniforms.push_back_n(count);
|
| for (int i = 0; i < count; i++) {
|
| Uniform& uniform = fUniforms[i];
|
| - const GrGLProgramBuilder::UniformInfo& builderUniform = builder.getUniformInfos()[i];
|
| + const UniformInfo& builderUniform = uniforms[i];
|
| SkASSERT(GrGLShaderVar::kNonArray == builderUniform.fVariable.getArrayCount() ||
|
| builderUniform.fVariable.getArrayCount() > 0);
|
| SkDEBUGCODE(
|
| @@ -38,26 +33,13 @@ GrGLProgramDataManager::GrGLProgramDataManager(GrGpuGL* gpu,
|
| uniform.fVSLocation = builderUniform.fLocation;
|
| } else {
|
| uniform.fVSLocation = kUnusedUniform;
|
| - }
|
| + }
|
| if (GrGLProgramBuilder::kFragment_Visibility & builderUniform.fVisibility) {
|
| uniform.fFSLocation = builderUniform.fLocation;
|
| } else {
|
| uniform.fFSLocation = kUnusedUniform;
|
| }
|
| }
|
| -
|
| - count = builder.getSeparableVaryingInfos().count();
|
| - fVaryings.push_back_n(count);
|
| - for (int i = 0; i < count; i++) {
|
| - Varying& varying = fVaryings[i];
|
| - const GrGLProgramBuilder::SeparableVaryingInfo& builderVarying =
|
| - builder.getSeparableVaryingInfos()[i];
|
| - SkASSERT(GrGLShaderVar::kNonArray == builderVarying.fVariable.getArrayCount());
|
| - SkDEBUGCODE(
|
| - varying.fType = builderVarying.fVariable.getType();
|
| - );
|
| - varying.fLocation = builderVarying.fLocation;
|
| - }
|
| }
|
|
|
| void GrGLProgramDataManager::setSampler(UniformHandle u, GrGLint texUnit) const {
|
| @@ -276,14 +258,3 @@ void GrGLProgramDataManager::setSkMatrix(UniformHandle u, const SkMatrix& matrix
|
| };
|
| this->setMatrix3f(u, mt);
|
| }
|
| -
|
| -void GrGLProgramDataManager::setProgramPathFragmentInputTransform(VaryingHandle i,
|
| - unsigned components,
|
| - const SkMatrix& matrix) const {
|
| - const Varying& fragmentInput = fVaryings[i.toProgramDataIndex()];
|
| - fGpu->glPathRendering()->setProgramPathFragmentInputTransform(fProgram->programID(),
|
| - fragmentInput.fLocation,
|
| - GR_GL_OBJECT_LINEAR,
|
| - components,
|
| - matrix);
|
| -}
|
|
|