aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar ssid <ssid@chromium.org>2015-09-04 08:29:24 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-04 08:29:24 -0700
commit85237822b3f736e1738b5791227a2d6656137f23 (patch)
treec8b64d51b8cfe26e81fbe3358518e7e4d13481c2 /src/core
parent55143211e955594a0913d0f9b0f7853f9c8c4954 (diff)
Fix SkOneShotDiscardablePixelRef to return discardable segment.
The SkOneShotDiscardablePixelRef was not overriding diagnostic_only_getDiscardable method of SkPixelRef. This caused the memory to be acocunted under malloc instead of discardable and caused wrong accounting. BUG=528295 Review URL: https://codereview.chromium.org/1304083006
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkResourceCache.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/SkResourceCache.cpp b/src/core/SkResourceCache.cpp
index 7d3c3420db..46229fa5bd 100644
--- a/src/core/SkResourceCache.cpp
+++ b/src/core/SkResourceCache.cpp
@@ -87,6 +87,8 @@ protected:
void onUnlockPixels() override;
size_t getAllocatedSizeInBytes() const override;
+ SkDiscardableMemory* diagnostic_only_getDiscardable() const override { return fDM; }
+
private:
SkDiscardableMemory* fDM;
size_t fRB;