Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: include/gpu/GrCacheable.h

Issue 376703009: Use the GrCacheable ID to eliminate the need for notifications to GrGpuGL when textures and RTs are… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: improve Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrBitmapTextContext.h » ('j') | src/gpu/GrCacheable.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrCacheable.h
diff --git a/include/gpu/GrCacheable.h b/include/gpu/GrCacheable.h
index 344ae6b58319edd1e41fe7222ef0087a188c79e3..2835d1d44110c83bf66ad424051e613a08df760c 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.
*/
- uint32_t getGenerationID() const;
+ uint32_t getInstanceID() const { return fInstanceID; }
protected:
GrCacheable()
: fCacheEntry(NULL)
- , fGenID(0) {}
+ , fInstanceID(CreateInstanceID()) {}
bool isInCache() const { return NULL != fCacheEntry; }
@@ -64,8 +64,10 @@ protected:
void didChangeGpuMemorySize() const;
private:
+ static uint32_t CreateInstanceID();
+
GrResourceCacheEntry* fCacheEntry; // NULL if not in cache
- mutable uint32_t fGenID;
+ mutable uint32_t fInstanceID;
typedef SkRefCnt INHERITED;
};
« no previous file with comments | « no previous file | src/gpu/GrBitmapTextContext.h » ('j') | src/gpu/GrCacheable.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698