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

Unified Diff: include/gpu/GrGpuResource.h

Issue 858123002: Add specialized content key class for resources. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove default template arg Created 5 years, 11 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 | « include/gpu/GrContext.h ('k') | include/gpu/GrResourceKey.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrGpuResource.h
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
index 750ec6a44005177aba22e0beee9a5603c3fad263..d6abc4d12cd949cd529e0ac7466f2edfa78cee35 100644
--- a/include/gpu/GrGpuResource.h
+++ b/include/gpu/GrGpuResource.h
@@ -259,7 +259,7 @@ private:
virtual size_t onGpuMemorySize() const = 0;
// See comments in CacheAccess.
- bool setContentKey(const GrResourceKey& contentKey);
+ bool setContentKey(const GrContentKey& contentKey);
void notifyIsPurgable() const;
void removeScratchKey();
void makeBudgeted();
@@ -275,27 +275,18 @@ private:
static const size_t kInvalidGpuMemorySize = ~static_cast<size_t>(0);
- enum Flags {
- /**
- * If set then fContentKey is valid and the resource is cached based on its content.
- */
- kContentKeySet_Flag = 0x1,
- };
-
- GrScratchKey fScratchKey;
- // TODO(bsalomon): Remove GrResourceKey and use different simpler type for content keys.
- GrResourceKey fContentKey;
+ GrScratchKey fScratchKey;
+ GrContentKey fContentKey;
// This is not ref'ed but abandon() or release() will be called before the GrGpu object
// is destroyed. Those calls set will this to NULL.
- GrGpu* fGpu;
- mutable size_t fGpuMemorySize;
+ GrGpu* fGpu;
+ mutable size_t fGpuMemorySize;
- uint32_t fFlags;
- LifeCycle fLifeCycle;
- const uint32_t fUniqueID;
+ LifeCycle fLifeCycle;
+ const uint32_t fUniqueID;
- SkAutoTUnref<const SkData> fData;
+ SkAutoTUnref<const SkData> fData;
typedef GrIORef<GrGpuResource> INHERITED;
friend class GrIORef<GrGpuResource>; // to access notifyIsPurgable.
« no previous file with comments | « include/gpu/GrContext.h ('k') | include/gpu/GrResourceKey.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698