aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-08-26 14:01:07 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-26 14:01:07 -0700
commit169612621f00b3fe9f71014079991287d311751a (patch)
tree5a1ab159dc1515cb5d12fc759db2f611b0961eff /include
parent9407eceb2784dd13c135f8f266ffbeb1ffe5fd48 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrGpuResource.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
index 8b162823bf..17cdfc9a4c 100644
--- a/include/gpu/GrGpuResource.h
+++ b/include/gpu/GrGpuResource.h
@@ -90,6 +90,11 @@ public:
uint32_t getUniqueID() const { return fUniqueID; }
protected:
+
+ // This must be called by every GrGpuObject. It should be called once the object is fully
+ // initialized (i.e. not in a base class constructor).
+ void registerWithCache();
+
GrGpuResource(GrGpu*, bool isWrapped);
virtual ~GrGpuResource();