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

Unified Diff: src/gpu/GrResourceCache.h

Issue 414013005: Merge GrGpuObject and GrCacheable. (Closed) Base URL: https://skia.googlesource.com/skia.git@uniqueid
Patch Set: Address comments 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 | « src/gpu/GrGpuObject.cpp ('k') | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrResourceCache.h
diff --git a/src/gpu/GrResourceCache.h b/src/gpu/GrResourceCache.h
index ccfe7fa3ad0d870a3744436f8b434daf3dbb8545..63a7a67ee5644321f07778546c7b4f8ca20da71b 100644
--- a/src/gpu/GrResourceCache.h
+++ b/src/gpu/GrResourceCache.h
@@ -18,7 +18,7 @@
#include "SkMessageBus.h"
#include "SkTInternalLList.h"
-class GrCacheable;
+class GrGpuObject;
class GrResourceCache;
class GrResourceCacheEntry;
@@ -29,11 +29,11 @@ public:
return gDomain;
}
- /** Uniquely identifies the GrCacheable subclass in the key to avoid collisions
+ /** Uniquely identifies the GrGpuObject subclass in the key to avoid collisions
across resource types. */
typedef uint8_t ResourceType;
- /** Flags set by the GrCacheable subclass. */
+ /** Flags set by the GrGpuObject subclass. */
typedef uint8_t ResourceFlags;
/** Generate a unique ResourceType */
@@ -118,7 +118,7 @@ struct GrResourceInvalidatedMessage {
class GrResourceCacheEntry {
public:
- GrCacheable* resource() const { return fResource; }
+ GrGpuObject* resource() const { return fResource; }
const GrResourceKey& key() const { return fKey; }
static const GrResourceKey& GetKey(const GrResourceCacheEntry& e) { return e.key(); }
@@ -131,7 +131,7 @@ public:
/**
* Update the cached size for this entry and inform the resource cache that
- * it has changed. Usually invoked from GrCacheable::didChangeGpuMemorySize,
+ * it has changed. Usually invoked from GrGpuObject::didChangeGpuMemorySize,
* not directly from here.
*/
void didChangeResourceSize();
@@ -139,12 +139,12 @@ public:
private:
GrResourceCacheEntry(GrResourceCache* resourceCache,
const GrResourceKey& key,
- GrCacheable* resource);
+ GrGpuObject* resource);
~GrResourceCacheEntry();
GrResourceCache* fResourceCache;
GrResourceKey fKey;
- GrCacheable* fResource;
+ GrGpuObject* fResource;
size_t fCachedSize;
bool fIsExclusive;
@@ -157,7 +157,7 @@ private:
///////////////////////////////////////////////////////////////////////////////
/**
- * Cache of GrCacheable objects.
+ * Cache of GrGpuObject objects.
*
* These have a corresponding GrResourceKey, built from 128bits identifying the
* resource. Multiple resources can map to same GrResourceKey.
@@ -246,7 +246,7 @@ public:
* For a resource to be completely exclusive to a caller both kNoOtherOwners
* and kHide must be specified.
*/
- GrCacheable* find(const GrResourceKey& key,
+ GrGpuObject* find(const GrResourceKey& key,
uint32_t ownershipFlags = 0);
/**
@@ -261,7 +261,7 @@ public:
* is called.
*/
void addResource(const GrResourceKey& key,
- GrCacheable* resource,
+ GrGpuObject* resource,
uint32_t ownershipFlags = 0);
/**
« no previous file with comments | « src/gpu/GrGpuObject.cpp ('k') | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698