Refactor separable varying location info to be stored in GrGLProgram subclass
authorkkinnunen <kkinnunen@nvidia.com>
Tue, 30 Jun 2015 06:01:28 +0000 (23:01 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 30 Jun 2015 06:01:28 +0000 (23:01 -0700)
commit7aedda57f84f942b5f0ba6c1b6e7ba329e6b18f1
treec05dd8eb983a44df9cecf410ff5604ffd4593a38
parente04edd8c8618f1a637f0cdbe340474e2c10a60ad
Refactor separable varying location info to be stored in GrGLProgram subclass

Refactor separable varying location info to be stored in GrGLProgram
subclass GrGLProgram instead of storing it in GrGLPathProcessor.

Separable varyings are exactly analoguous to uniforms: they are inputs
to the shader program. Shader compile-time information about uniforms is gathered to
GrGLProgramBuilder. This information is the converted to link-time
information, uniform locations, when constructing the program. Separable
varyings need to have same lifetime model.

This is needed in the future to support path rendering in Chromium. The
Chromium pseudo-extension will expose program fragment input binding
function similar to uniform binding function. Thus the separable varying
locations need to be decided and bound before link, e.g. before
GrGLProgram is created. This will be achieved in further patches by
overloading GrGLProgramBuilder::bindProgramResourceLocations() in
GrGLNvprProgramBuilder.

BUG=chromium:344330

Review URL: https://codereview.chromium.org/1186113007
16 files changed:
gyp/gpu.gypi
src/gpu/gl/GrGLPathProcessor.cpp
src/gpu/gl/GrGLPathProcessor.h
src/gpu/gl/GrGLPathProgram.cpp [new file with mode: 0644]
src/gpu/gl/GrGLPathProgram.h [new file with mode: 0644]
src/gpu/gl/GrGLPathProgramDataManager.cpp [new file with mode: 0644]
src/gpu/gl/GrGLPathProgramDataManager.h [new file with mode: 0644]
src/gpu/gl/GrGLPrimitiveProcessor.h
src/gpu/gl/GrGLProgram.cpp
src/gpu/gl/GrGLProgram.h
src/gpu/gl/GrGLProgramDataManager.cpp
src/gpu/gl/builders/GrGLPathProgramBuilder.cpp [new file with mode: 0644]
src/gpu/gl/builders/GrGLPathProgramBuilder.h [new file with mode: 0644]
src/gpu/gl/builders/GrGLProgramBuilder.cpp
src/gpu/gl/builders/GrGLProgramBuilder.h
src/gpu/gl/builders/GrGLShaderBuilder.h