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

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

Issue 815643005: Move program descriptor and primitive processor off of optstate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bug fix Created 5 years, 11 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/GrGLProgramDesc.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgramDesc.cpp
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index 299e0473ad77c69fc735497713f8c6c16c1cc9e7..243be01acdd3f5eb84f0d2276c65d89c15d7a3ec 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -86,11 +86,13 @@ static bool get_meta_key(const GrProcessor& proc,
return true;
}
-bool GrGLProgramDescBuilder::Build(const GrOptDrawState& optState,
+bool GrGLProgramDescBuilder::Build(GrProgramDesc* desc,
+ const GrPrimitiveProcessor& primProc,
+ const GrOptDrawState& optState,
const GrProgramDesc::DescInfo& descInfo,
GrGpu::DrawType drawType,
- GrGLGpu* gpu,
- GrProgramDesc* desc) {
+ const GrGLGpu* gpu,
+ const GrBatchTracker& batchTracker) {
// The descriptor is used as a cache key. Thus when a field of the
// descriptor will not affect program generation (because of the attribute
// bindings in use or other descriptor field settings) it should be set
@@ -103,8 +105,7 @@ bool GrGLProgramDescBuilder::Build(const GrOptDrawState& optState,
GrProcessorKeyBuilder b(&desc->fKey);
- const GrPrimitiveProcessor& primProc = *optState.getPrimitiveProcessor();
- primProc.getGLProcessorKey(optState.getBatchTracker(), gpu->glCaps(), &b);
+ primProc.getGLProcessorKey(batchTracker, gpu->glCaps(), &b);
if (!get_meta_key(primProc, gpu->glCaps(), 0, &b)) {
desc->fKey.reset();
return false;
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698