Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Unified Diff: src/gpu/gl/GrGpuGL_program.cpp

Issue 611653002: Cleanup of shader building system (Closed) Base URL: https://skia.googlesource.com/skia.git@solo_gp
Patch Set: more cleanup Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGpuGL_program.cpp
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 2e6bfc4f925651d8235fa4c14ab27530e16a1e61..afb03450d430723db8723bdc1c478fce47b46bdd 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -7,6 +7,7 @@
#include "GrGpuGL.h"
+#include "builders/GrGLProgramBuilder.h"
#include "GrProcessor.h"
#include "GrGLProcessor.h"
#include "GrGLPathRendering.h"
@@ -91,6 +92,7 @@ int GrGpuGL::ProgramCache::search(const GrGLProgramDesc& desc) const {
}
GrGLProgram* GrGpuGL::ProgramCache::getProgram(const GrGLProgramDesc& desc,
+ DrawType type,
const GrGeometryStage* geometryProcessor,
const GrFragmentStage* colorStages[],
const GrFragmentStage* coverageStages[]) {
@@ -128,8 +130,8 @@ GrGLProgram* GrGpuGL::ProgramCache::getProgram(const GrGLProgramDesc& desc,
#ifdef PROGRAM_CACHE_STATS
++fCacheMisses;
#endif
- GrGLProgram* program = GrGLProgram::Create(fGpu, desc, geometryProcessor,
- colorStages, coverageStages);
+ GrGLProgram* program = GrGLProgramBuilder::CreateProgram(desc, type, geometryProcessor,
+ colorStages, coverageStages, fGpu);
if (NULL == program) {
return NULL;
}
@@ -246,6 +248,7 @@ bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC
}
fCurrentProgram.reset(fProgramCache->getProgram(desc,
+ type,
geometryProcessor,
colorStages.begin(),
coverageStages.begin()));

Powered by Google App Engine
This is Rietveld 408576698