Make GrGpuResources register with GrResourceCache2 after fully constructed.
Committed: https://skia.googlesource.com/skia/+/d68b3e491bb765beb7ca5e4ac8e0c80dedf5a83b
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/504313002
diff --git a/bench/GrResourceCacheBench.cpp b/bench/GrResourceCacheBench.cpp
index 84e0e5d..068aff2 100644
--- a/bench/GrResourceCacheBench.cpp
+++ b/bench/GrResourceCacheBench.cpp
@@ -27,6 +27,7 @@
StencilResource(GrGpu* gpu, int id)
: INHERITED(gpu, false)
, fID(id) {
+ this->registerWithCache();
}
virtual ~StencilResource() { this->release(); }
@@ -51,6 +52,7 @@
TextureResource(GrGpu* gpu, int id)
: INHERITED(gpu, false)
, fID(id) {
+ this->registerWithCache();
}
virtual ~TextureResource() { this->release(); }