diff options
author | stephana <stephana@google.com> | 2015-02-02 14:52:11 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-02 14:52:11 -0800 |
commit | 9b440260d54795213a13d6394b5c9546e0f69fae (patch) | |
tree | 09341308f322a7c23dd3ea481a1fb5c6e0b68695 /src/gpu/GrGpuResourceCacheAccess.h | |
parent | 85ed2db092e75db41b711b9116a8d5b465fc2b0c (diff) |
Revert of make getContentKey() available in GrGpuResource public interface (patchset #2 id:20001 of https://codereview.chromium.org/886313005/)
Reason for revert:
This causes in one case the linker and in the other the compiler to segfault. On
Test-Ubuntu12-ShuttleA-GTX660-x86_64-Debug/Release
Original issue's description:
> make getContentKey() available in GrGpuResource public interface
>
> TBR=robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/85ed2db092e75db41b711b9116a8d5b465fc2b0c
TBR=robertphillips@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/864343005
Diffstat (limited to 'src/gpu/GrGpuResourceCacheAccess.h')
-rw-r--r-- | src/gpu/GrGpuResourceCacheAccess.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gpu/GrGpuResourceCacheAccess.h b/src/gpu/GrGpuResourceCacheAccess.h index 867252d783..aa2337d7f2 100644 --- a/src/gpu/GrGpuResourceCacheAccess.h +++ b/src/gpu/GrGpuResourceCacheAccess.h @@ -33,7 +33,7 @@ public: * key, and does not have a content key. */ bool isScratch() const { - return !fResource->getContentKey().isValid() && fResource->fScratchKey.isValid() && + return !this->getContentKey().isValid() && fResource->fScratchKey.isValid() && this->isBudgeted(); } @@ -51,6 +51,11 @@ public: void removeScratchKey() const { fResource->removeScratchKey(); } /** + * If the resource is currently cached by a content key, the key is returned, otherwise NULL. + */ + const GrContentKey& getContentKey() const { return fResource->fContentKey; } + + /** * Is the resource object wrapping an externally allocated GPU resource? */ bool isWrapped() const { return GrGpuResource::kWrapped_LifeCycle == fResource->fLifeCycle; } @@ -60,7 +65,7 @@ public: */ bool isBudgeted() const { bool ret = GrGpuResource::kCached_LifeCycle == fResource->fLifeCycle; - SkASSERT(ret || !fResource->getContentKey().isValid()); + SkASSERT(ret || !this->getContentKey().isValid()); return ret; } |