Purge more cache data in RenderThreadImpl::ClearMemory
RenderThreadImpl::ClearMemory has been purging only font cache in Skia.
But, it would be good if we purge more cache data in RenderThreadImpl::ClearMemory,
because it has mainly called under out of memory. I found SkGraphics::PurgeAllCaches
purges more cache data, so this CL calls it instead of calling SkGraphics::SetFontCacheLimit.
void SkGraphics::PurgeAllCaches() {
SkGraphics::PurgeFontCache();
SkGraphics::PurgeResourceCache();
SkImageFilter::PurgeCache();
}
Although I add a new test to measure if RenderThreadImpl::ClearMemory purges memory,
it's not completed yet. But, this CL can be covered by tests for MemoryPressureListener.
(i.e, RenderWidgetHostViewAuraTest.DiscardDelegatedFramesWithMemoryPressure.)
Bug: None
Change-Id: I6d702e02c84a04c98489bc3f20b52f55beed1452
Reviewed-on: https://chromium-review.googlesource.com/910732Reviewed-by:
Kentaro Hara <haraken@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@lge.com>
Cr-Commit-Position: refs/heads/master@{#539452}
Showing
Please register or sign in to comment