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/GrProgramDesc.h b/src/gpu/GrProgramDesc.h
index 07b0110..bd7c6ec 100644
--- a/src/gpu/GrProgramDesc.h
+++ b/src/gpu/GrProgramDesc.h
@@ -22,6 +22,8 @@
*/
class GrProgramDesc {
public:
+ GrProgramDesc(const GrProgramDesc& other) : fKey(other.fKey) {} // for SkLRUCache
+
bool isValid() const { return !fKey.empty(); }
// Returns this as a uint32_t array to be used as a key in the program cache.