diff options
author | bsalomon <bsalomon@google.com> | 2015-02-06 11:54:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-06 11:54:28 -0800 |
commit | 23e619cf462b2a8a500f3ca750e099f79601f508 (patch) | |
tree | ee448aaed72aa80f035a8b7b2ec285cd8aadfd2b /src/gpu/GrGpuResource.cpp | |
parent | d0423587ac56ae84d3f1eb796d5c1e2dfba9646e (diff) |
Reimplement gpu message bus for invalidated bitmap gen IDs
Review URL: https://codereview.chromium.org/902873002
Diffstat (limited to 'src/gpu/GrGpuResource.cpp')
-rw-r--r-- | src/gpu/GrGpuResource.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/GrGpuResource.cpp b/src/gpu/GrGpuResource.cpp index 6d250e4820..7fb5559362 100644 --- a/src/gpu/GrGpuResource.cpp +++ b/src/gpu/GrGpuResource.cpp @@ -82,9 +82,16 @@ void GrGpuResource::didChangeGpuMemorySize() const { get_resource_cache2(fGpu)->resourceAccess().didChangeGpuMemorySize(this, oldSize); } +void GrGpuResource::removeContentKey() { + SkASSERT(fContentKey.isValid()); + get_resource_cache2(fGpu)->resourceAccess().willRemoveContentKey(this); + fContentKey.reset(); +} + bool GrGpuResource::setContentKey(const GrContentKey& key) { // Currently this can only be called once and can't be called when the resource is scratch. SkASSERT(this->internalHasRef()); + SkASSERT(key.isValid()); // Wrapped and uncached resources can never have a content key. if (!this->cacheAccess().isBudgeted()) { |