Index: src/gpu/GrResourceCache2.cpp |
diff --git a/src/gpu/GrResourceCache2.cpp b/src/gpu/GrResourceCache2.cpp |
index 65e522aafbae13b310600138b4fee6f229bdce98..f7c9a7a119faf6d1ab3d23e8dd85fe30a4d5981e 100644 |
--- a/src/gpu/GrResourceCache2.cpp |
+++ b/src/gpu/GrResourceCache2.cpp |
@@ -10,6 +10,25 @@ |
#include "GrResourceCache2.h" |
#include "GrGpuResource.h" |
+GrResourceKey& GrResourceKey::NullScratchKey() { |
+ static const GrCacheID::Key kBogusKey = { { {0} } }; |
+ static GrCacheID kBogusID(ScratchDomain(), kBogusKey); |
+ static GrResourceKey kNullScratchKey(kBogusID, NoneResourceType(), 0); |
+ return kNullScratchKey; |
+} |
+ |
+GrResourceKey::ResourceType GrResourceKey::NoneResourceType() { |
+ static const ResourceType gNoneResourceType = GenerateResourceType(); |
+ return gNoneResourceType; |
+} |
+ |
+GrCacheID::Domain GrResourceKey::ScratchDomain() { |
+ static const GrCacheID::Domain gDomain = GrCacheID::GenerateDomain(); |
+ return gDomain; |
+} |
+ |
+////////////////////////////////////////////////////////////////////////////// |
+ |
GrResourceCache2::~GrResourceCache2() { |
this->releaseAll(); |
} |