Cleanup program building a bit
This CL:
now passes the GrProgramDesc as a const&
returns GrGLProgram as an sk_sp
makes the parameter ordering more consistent
makes GrVkPipelineState no longer ref-counted
This is pulled out of the DDL pre-compile CL which touches this portion of the code.
Bug: skia:9455
Change-Id: Id4d06f93450e276de5a2662be330ae9523026244
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268777
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index 54b97fd..8cc1f06 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -21,15 +21,15 @@
const int GrGLSLProgramBuilder::kVarsPerBlock = 8;
GrGLSLProgramBuilder::GrGLSLProgramBuilder(GrRenderTarget* renderTarget,
- const GrProgramInfo& programInfo,
- const GrProgramDesc* desc)
+ const GrProgramDesc& desc,
+ const GrProgramInfo& programInfo)
: fVS(this)
, fGS(this)
, fFS(this)
, fStageIndex(-1)
, fRenderTarget(renderTarget)
- , fProgramInfo(programInfo)
, fDesc(desc)
+ , fProgramInfo(programInfo)
, fGeometryProcessor(nullptr)
, fXferProcessor(nullptr)
, fNumFragmentSamplers(0) {}