| Index: src/gpu/gl/GrGLProgramDataManager.cpp
|
| diff --git a/src/gpu/gl/GrGLProgramDataManager.cpp b/src/gpu/gl/GrGLProgramDataManager.cpp
|
| index eed9d1935db619eeb5ccc4eae4fd1596cbfd9b1e..c53abd79abe3a3774129c8aff17b75201e556a19 100644
|
| --- a/src/gpu/gl/GrGLProgramDataManager.cpp
|
| +++ b/src/gpu/gl/GrGLProgramDataManager.cpp
|
| @@ -6,6 +6,7 @@
|
| */
|
|
|
| #include "gl/builders/GrGLProgramBuilder.h"
|
| +#include "gl/GrGLPathRendering.h"
|
| #include "gl/GrGLProgram.h"
|
| #include "gl/GrGLUniformHandle.h"
|
| #include "gl/GrGpuGL.h"
|
| @@ -16,9 +17,10 @@
|
| (1 == arrayCount && GrGLShaderVar::kNonArray == uni.fArrayCount))
|
|
|
| GrGLProgramDataManager::GrGLProgramDataManager(GrGpuGL* gpu,
|
| - GrGLProgram*,
|
| + GrGLProgram* program,
|
| const GrGLProgramBuilder& builder)
|
| - : fGpu(gpu) {
|
| + : fGpu(gpu),
|
| + fProgram(program) {
|
| int count = builder.getUniformInfos().count();
|
| fUniforms.push_back_n(count);
|
| for (int i = 0; i < count; i++) {
|
| @@ -43,6 +45,19 @@ GrGLProgramDataManager::GrGLProgramDataManager(GrGpuGL* gpu,
|
| 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 {
|
| @@ -261,3 +276,14 @@ 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);
|
| +}
|
|
|