diff options
author | joshualitt <joshualitt@chromium.org> | 2014-10-07 12:16:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-07 12:16:36 -0700 |
commit | fe1233c3f12f81bb675718516bbb32f72af726ec (patch) | |
tree | b39450a8713c745152561c4497ef65ce7349364a /src/gpu/gl/GrGLProgramDesc.cpp | |
parent | 9323b8b8e16df4adcd63ee8496a6382e8df535c9 (diff) |
Cleanup of shader building system
this is a huge refactor and cleanup of the gl shader building system in
Skia. The entire shader building pipeline is now part of
GrGLProgramCreator, which takes a gp, and some fps, and creates a
program. I added some subclasses of GrGLProgram to handle the
eccentricities of Nvpr/Nvpres. Outside of the builders folder
and GrGLPrograms, this change is basically just a rename
solo gp
BUG=skia:
Review URL: https://codereview.chromium.org/611653002
Diffstat (limited to 'src/gpu/gl/GrGLProgramDesc.cpp')
-rw-r--r-- | src/gpu/gl/GrGLProgramDesc.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp index 19a26c9b08..ec09527182 100644 --- a/src/gpu/gl/GrGLProgramDesc.cpp +++ b/src/gpu/gl/GrGLProgramDesc.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ -#include "gl/builders/GrGLProgramBuilder.h" +#include "gl/builders/GrGLFragmentShaderBuilder.h" #include "GrGLProgramDesc.h" #include "GrBackendProcessorFactory.h" #include "GrProcessor.h" @@ -178,7 +178,7 @@ bool GrGLProgramDesc::GetGeometryProcessorKey(const GrGeometryStage& stage, if (NULL == key) { return false; } - uint32_t attribKey = gen_attrib_key(stage.getGeometryProcessor()); + uint32_t attribKey = gen_attrib_key(stage.getProcessor()); // Currently we allow 16 bits for each of the above portions of the meta-key. Fail if they // don't fit. @@ -348,15 +348,16 @@ bool GrGLProgramDesc::Build(const GrOptDrawState& optState, dstCopyTexture = dstCopy->texture(); } header->fDstReadKey = GrGLFragmentShaderBuilder::KeyForDstRead(dstCopyTexture, - gpu->glCaps()); + gpu->glCaps()); SkASSERT(0 != header->fDstReadKey); } else { header->fDstReadKey = 0; } if (optState.readsFragPosition()) { - header->fFragPosKey = GrGLFragmentShaderBuilder::KeyForFragmentPosition( - optState.getRenderTarget(), gpu->glCaps()); + header->fFragPosKey = + GrGLFragmentShaderBuilder::KeyForFragmentPosition(optState.getRenderTarget(), + gpu->glCaps()); } else { header->fFragPosKey = 0; } |