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
This commit is contained in:
parent
55143211e9
commit
85237822b3
@ -87,6 +87,8 @@ protected:
|
|||||||
void onUnlockPixels() override;
|
void onUnlockPixels() override;
|
||||||
size_t getAllocatedSizeInBytes() const override;
|
size_t getAllocatedSizeInBytes() const override;
|
||||||
|
|
||||||
|
SkDiscardableMemory* diagnostic_only_getDiscardable() const override { return fDM; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SkDiscardableMemory* fDM;
|
SkDiscardableMemory* fDM;
|
||||||
size_t fRB;
|
size_t fRB;
|
||||||
|
Loading…
Reference in New Issue
Block a user