diff options
author | bsalomon <bsalomon@google.com> | 2014-11-10 11:59:06 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-10 11:59:06 -0800 |
commit | fe369ee34bc59a7e87b5d21bb0117e92cf75c103 (patch) | |
tree | a7259bb0f0545ab893f5687fc803616d40cb1016 /include/gpu/GrResourceKey.h | |
parent | 8b79d23f825cd9e0f9e3bf8aaa9e209940b17ef6 (diff) |
Move GrResourceKey static functions from .h to .cpp to fix shared lib builds
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/718493002
Diffstat (limited to 'include/gpu/GrResourceKey.h')
-rw-r--r-- | include/gpu/GrResourceKey.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h index d3e82c8e58..6a9ff89521 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, |