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

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

Issue 637003003: Opt state takes a GP instead of a GeometryStage (Closed) Base URL: https://skia.googlesource.com/skia.git@builder_cleanup
Patch Set: memory leaks fixed Created 6 years, 2 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
« no previous file with comments | « src/gpu/gl/GrGpuGL.h ('k') | src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGpuGL_program.cpp
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 7dba5316a4e7afee640b9c4402ca2e1b07129148..6a09ebf64e1564d03e0d54cd7cfed199630610d4 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -93,10 +93,7 @@ int GrGpuGL::ProgramCache::search(const GrGLProgramDesc& desc) const {
GrGLProgram* GrGpuGL::ProgramCache::getProgram(const GrOptDrawState& optState,
const GrGLProgramDesc& desc,
- DrawType type,
- const GrGeometryStage* geometryProcessor,
- const GrFragmentStage* colorStages[],
- const GrFragmentStage* coverageStages[]) {
+ DrawType type) {
#ifdef PROGRAM_CACHE_STATS
++fTotalRequests;
#endif
@@ -131,9 +128,7 @@ GrGLProgram* GrGpuGL::ProgramCache::getProgram(const GrOptDrawState& optState,
#ifdef PROGRAM_CACHE_STATS
++fCacheMisses;
#endif
- GrGLProgram* program = GrGLProgramBuilder::CreateProgram(optState, desc, type,
- geometryProcessor, colorStages,
- coverageStages, fGpu);
+ GrGLProgram* program = GrGLProgramBuilder::CreateProgram(optState, desc, type, fGpu);
if (NULL == program) {
return NULL;
}
@@ -237,30 +232,13 @@ bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC
return false;
}
- const GrGeometryStage* geometryProcessor = NULL;
- SkSTArray<8, const GrFragmentStage*, true> colorStages;
- SkSTArray<8, const GrFragmentStage*, true> coverageStages;
GrGLProgramDesc desc;
- if (!GrGLProgramDesc::Build(*optState.get(),
- type,
- srcCoeff,
- dstCoeff,
- this,
- dstCopy,
- &geometryProcessor,
- &colorStages,
- &coverageStages,
- &desc)) {
+ if (!GrGLProgramDesc::Build(*optState.get(), type, this, dstCopy, &desc)) {
SkDEBUGFAIL("Failed to generate GL program descriptor");
return false;
}
- fCurrentProgram.reset(fProgramCache->getProgram(*optState.get(),
- desc,
- type,
- geometryProcessor,
- colorStages.begin(),
- coverageStages.begin()));
+ fCurrentProgram.reset(fProgramCache->getProgram(*optState.get(), desc, type));
if (NULL == fCurrentProgram.get()) {
SkDEBUGFAIL("Failed to create program!");
return false;
@@ -276,13 +254,7 @@ bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC
this->flushBlend(*optState.get(), kDrawLines_DrawType == type, srcCoeff, dstCoeff);
- fCurrentProgram->setData(*optState.get(),
- type,
- geometryProcessor,
- colorStages.begin(),
- coverageStages.begin(),
- dstCopy,
- &fSharedGLProgramState);
+ fCurrentProgram->setData(*optState.get(), type, dstCopy, &fSharedGLProgramState);
}
GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(optState->getRenderTarget());
« no previous file with comments | « src/gpu/gl/GrGpuGL.h ('k') | src/gpu/gl/builders/GrGLLegacyNvprProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698