Store ProgramDesc on DDLs alongside the GrProgramInfo
We already have the program desc bc we uniquify the programs stored
on the DDL. This CL just preserves them on the snapped DDL to speed
up precompilation.
Bug: skia:9455
Change-Id: Ie0e0b607e2e96beca7128f4083386b34ad469072
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270998
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/gl/GrGLGpuProgramCache.cpp b/src/gpu/gl/GrGLGpuProgramCache.cpp
index 6453bde..9c7115f 100644
--- a/src/gpu/gl/GrGLGpuProgramCache.cpp
+++ b/src/gpu/gl/GrGLGpuProgramCache.cpp
@@ -32,7 +32,7 @@
GrGLGpu::ProgramCache::~ProgramCache() {}
void GrGLGpu::ProgramCache::abandon() {
- fMap.foreach([](std::unique_ptr<Entry>* e) {
+ fMap.foreach([](GrProgramDesc*, std::unique_ptr<Entry>* e) {
if ((*e)->fProgram) {
(*e)->fProgram->abandon();
}
@@ -51,7 +51,7 @@
GrProgramDesc desc = caps.makeDesc(renderTarget, programInfo);
if (!desc.isValid()) {
- GrCapsDebugf(fGpu->caps(), "Failed to gl program descriptor!\n");
+ GrCapsDebugf(&caps, "Failed to gl program descriptor!\n");
return nullptr;
}