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

Unified Diff: include/gpu/GrResource.h

Issue 91453002: Speed up GrResourceCache add and lookup by using TDynamicHash (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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
Index: include/gpu/GrResource.h
diff --git a/include/gpu/GrResource.h b/include/gpu/GrResource.h
index 93dec58d80632a2bea38303c3a32be994e73f237..4d9951655ec09d902c0808372123670f34a2c572 100644
--- a/include/gpu/GrResource.h
+++ b/include/gpu/GrResource.h
@@ -84,6 +84,8 @@ public:
void setNeedsDeferredUnref() { fFlags |= kDeferredUnref_FlagBit; }
+ SK_DECLARE_NAMED_INTERNAL_LLIST_INTERFACE(GrResource, CacheLRU);
+ SK_DECLARE_NAMED_INTERNAL_LLIST_INTERFACE(GrResource, CacheEntryResources);
protected:
/**
* isWrapped indicates we have wrapped a client-created backend resource in a GrResource. If it
@@ -111,6 +113,9 @@ private:
// We're in an internal doubly linked list
SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrResource);
mtklein 2013/12/03 19:02:02 It seems weird to have one default and two named l
+ SK_DECLARE_NAMED_INTERNAL_LLIST_INTERFACE_DATA(GrResource, CacheLRU);
+ SK_DECLARE_NAMED_INTERNAL_LLIST_INTERFACE_DATA(GrResource, CacheEntryResources);
+
GrGpu* fGpu; // not reffed. The GrGpu can be deleted while there
// are still live GrResources. It will call

Powered by Google App Engine
This is Rietveld 408576698