Retract GrRenderTarget from GrCaps & GrProgramDesc where possible
Fully retracting GrRenderTarget is still blocked on Dawn, D3D,
and Vk uses.
Change-Id: I59ebce40d85134f8ee18c143df2a3f4b70c3dcb1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386840
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp
index ebe66ff..d2ed7e8 100644
--- a/src/gpu/GrProgramDesc.cpp
+++ b/src/gpu/GrProgramDesc.cpp
@@ -137,7 +137,6 @@
}
static void gen_key(GrProcessorKeyBuilder* b,
- GrRenderTarget* renderTarget,
const GrProgramInfo& programInfo,
const GrCaps& caps) {
gen_geomproc_key(programInfo.geomProc(), caps, b);
@@ -167,25 +166,19 @@
}
void GrProgramDesc::Build(GrProgramDesc* desc,
- GrRenderTarget* renderTarget,
const GrProgramInfo& programInfo,
const GrCaps& caps) {
- SkASSERT(!renderTarget || programInfo.backendFormat() == renderTarget->backendFormat());
-
desc->reset();
GrProcessorKeyBuilder b(desc->key());
- gen_key(&b, renderTarget, programInfo, caps);
+ gen_key(&b, programInfo, caps);
desc->fInitialKeyLength = desc->keyLength();
}
-SkString GrProgramDesc::Describe(GrRenderTarget* renderTarget,
- const GrProgramInfo& programInfo,
+SkString GrProgramDesc::Describe(const GrProgramInfo& programInfo,
const GrCaps& caps) {
- SkASSERT(!renderTarget || programInfo.backendFormat() == renderTarget->backendFormat());
-
GrProgramDesc desc;
GrProcessorStringKeyBuilder b(desc.key());
- gen_key(&b, renderTarget, programInfo, caps);
+ gen_key(&b, programInfo, caps);
b.flush();
return b.description();
}