aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-07-20 09:21:02 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-20 09:21:02 -0700
commit249171e7d29b5559f3eefe9dbd437030bfad3fda (patch)
tree86dc25e2eb7188b8b3f30721bebd388046870cb5 /include
parentf568f6a557dbc5a6b2f99b3747340ff7d36da26b (diff)
Revert of Use the GrCacheable ID to eliminate the need for notifications to GrGpuGL when textures and RTs are… (https://codereview.chromium.org/376703009/)
Reason for revert: Trying to unblock roll wedged on 64 bit intrinsic call on XP Original issue's description: > Use the GrCacheable ID to eliminate the need for notifications to GrGpuGL when textures and RTs are deleted. > > Also, rename GrCacheable::getGenerationID() to getInstanceID() since it doesn't behave like other "generation" IDs. > > Committed: https://skia.googlesource.com/skia/+/91bdbcdbbdf5cdf0fdb4518a0d30206c964cfdf6 R=jvanverth@google.com, bsalomon@google.com TBR=bsalomon@google.com, jvanverth@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/405023003
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrCacheable.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/gpu/GrCacheable.h b/include/gpu/GrCacheable.h
index 5cd9b0d1c4..344ae6b583 100644
--- a/include/gpu/GrCacheable.h
+++ b/include/gpu/GrCacheable.h
@@ -46,12 +46,12 @@ public:
* not change when the content of the GrCacheable object changes. This will never return
* 0.
*/
- uint64_t getInstanceID() const { return fInstanceID; }
+ uint32_t getGenerationID() const;
protected:
GrCacheable()
: fCacheEntry(NULL)
- , fInstanceID(CreateInstanceID()) {}
+ , fGenID(0) {}
bool isInCache() const { return NULL != fCacheEntry; }
@@ -64,10 +64,8 @@ protected:
void didChangeGpuMemorySize() const;
private:
- static uint64_t CreateInstanceID();
-
GrResourceCacheEntry* fCacheEntry; // NULL if not in cache
- mutable uint64_t fInstanceID;
+ mutable uint32_t fGenID;
typedef SkRefCnt INHERITED;
};