From fe1233c3f12f81bb675718516bbb32f72af726ec Mon Sep 17 00:00:00 2001 From: joshualitt Date: Tue, 7 Oct 2014 12:16:35 -0700 Subject: 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 --- src/gpu/gl/GrGLProgramDesc.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gpu/gl/GrGLProgramDesc.cpp') 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; } -- cgit v1.2.3