Add resource tracking output and command buffer recycling
BUG=skia:5042
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2115993002
Review-Url: https://codereview.chromium.org/2115993002
diff --git a/src/gpu/vk/GrVkResource.h b/src/gpu/vk/GrVkResource.h
index 6c08f4e..d42ec70 100644
--- a/src/gpu/vk/GrVkResource.h
+++ b/src/gpu/vk/GrVkResource.h
@@ -15,9 +15,9 @@
class GrVkGpu;
// uncomment to enable tracing of resource refs
-//#ifdef SK_DEBUG
-//#define SK_TRACE_VK_RESOURCES
-//#endif
+#ifdef SK_DEBUG
+#define SK_TRACE_VK_RESOURCES
+#endif
/** \class GrVkResource
@@ -121,6 +121,12 @@
}
#endif
+#ifdef SK_TRACE_VK_RESOURCES
+ /** Output a human-readable dump of this resource's information
+ */
+ virtual void dumpInfo() const = 0;
+#endif
+
private:
/** Must be implemented by any subclasses.
* Deletes any Vk data associated with this resource