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

Unified Diff: include/gpu/GrResourceKey.h

Issue 718493002: Move GrResourceKey static functions from .h to .cpp to fix shared lib builds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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/GrResourceCache2.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrResourceKey.h
diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h
index d3e82c8e580661709309a622b9cadfe887b56acf..6a9ff895212c53c81f349701f6139287a50c4fb5 100644
--- a/include/gpu/GrResourceKey.h
+++ b/include/gpu/GrResourceKey.h
@@ -14,10 +14,7 @@
class GrResourceKey {
public:
- static GrCacheID::Domain ScratchDomain() {
- static const GrCacheID::Domain gDomain = GrCacheID::GenerateDomain();
- return gDomain;
- }
+ static GrCacheID::Domain ScratchDomain();
/** Uniquely identifies the GrGpuResource subclass in the key to avoid collisions
across resource types. */
@@ -63,12 +60,7 @@ public:
bool operator==(const GrResourceKey& other) const { return fKey == other.fKey; }
// A key indicating that the resource is not usable as a scratch resource.
- static GrResourceKey& NullScratchKey() {
- static const GrCacheID::Key kBogusKey = { { {0} } };
- static GrCacheID kBogusID(ScratchDomain(), kBogusKey);
- static GrResourceKey kNullScratchKey(kBogusID, NoneResourceType(), 0);
- return kNullScratchKey;
- }
+ static GrResourceKey& NullScratchKey();
bool isNullScratch() const {
return this->isScratch() && NoneResourceType() == this->getResourceType();
@@ -85,10 +77,7 @@ private:
kPadSize = kKeySize - kPadOffset
};
- static ResourceType NoneResourceType() {
- static const ResourceType gNoneResourceType = GenerateResourceType();
- return gNoneResourceType;
- }
+ static ResourceType NoneResourceType();
void init(const GrCacheID::Domain domain,
const GrCacheID::Key& key,
« no previous file with comments | « no previous file | src/gpu/GrResourceCache2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698