Hoist GrVkResource up so it can be used for D3D and Metal.
Bug: skia:9935
Change-Id: Ie13b9077c5db805020973e5cbab1aa8468c88742
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276214
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
diff --git a/src/gpu/vk/GrVkDescriptorSet.cpp b/src/gpu/vk/GrVkDescriptorSet.cpp
index 81ffca0..ce029fc 100644
--- a/src/gpu/vk/GrVkDescriptorSet.cpp
+++ b/src/gpu/vk/GrVkDescriptorSet.cpp
@@ -20,11 +20,12 @@
fPool->ref();
}
-void GrVkDescriptorSet::freeGPUData(GrVkGpu* gpu) const {
+void GrVkDescriptorSet::freeGPUData(GrGpu* gpu) const {
fPool->unref(gpu);
}
-void GrVkDescriptorSet::onRecycle(GrVkGpu* gpu) const {
- gpu->resourceProvider().recycleDescriptorSet(this, fHandle);
+void GrVkDescriptorSet::onRecycle(GrGpu* gpu) const {
+ GrVkGpu* vkGpu = (GrVkGpu*)gpu;
+ vkGpu->resourceProvider().recycleDescriptorSet(this, fHandle);
}