Commit da08e180 authored by Adrienne Walker's avatar Adrienne Walker Committed by Commit Bot

Free more resources in gpu/oop raster when idle

This reverts:
https://chromium-review.googlesource.com/c/chromium/src/+/1123169
https://chromium-review.googlesource.com/c/chromium/src/+/1141102

...which are the gpu and oop raster versions of the same change,
respectively.

There was some hope that by freeing fewer resources we would help with
input latency, but this does not appear to have the desired effect in
either UMA or on bots.

Because this is a 4mb regression on Android (and maybe 12mb in WebView)
revert these two changes.

Bug: 863756, 865617
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I64eb735700ed1b704e191281ff79a01bccaff4e5
Reviewed-on: https://chromium-review.googlesource.com/1149093Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
Commit-Queue: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577956}
parent ecddc7ea
...@@ -159,11 +159,8 @@ void ContextCacheController::OnIdle(uint32_t idle_generation) { ...@@ -159,11 +159,8 @@ void ContextCacheController::OnIdle(uint32_t idle_generation) {
return; return;
} }
if (gr_context_) { if (gr_context_)
// Avoid the more complete GrContext::freeGpuResources, as that evicts gr_context_->freeGpuResources();
// harder to re-generate Skia caches.
gr_context_->purgeUnlockedResources(false /* scratchResourcesOnly */);
}
// Toggle SetAggressivelyFreeResources to drop command buffer data. // Toggle SetAggressivelyFreeResources to drop command buffer data.
context_support_->SetAggressivelyFreeResources(true); context_support_->SetAggressivelyFreeResources(true);
......
...@@ -47,8 +47,7 @@ void GrCacheController::PurgeGrCache(uint64_t idle_id) { ...@@ -47,8 +47,7 @@ void GrCacheController::PurgeGrCache(uint64_t idle_id) {
} }
context_state_->context->MakeCurrent(context_state_->surface.get()); context_state_->context->MakeCurrent(context_state_->surface.get());
context_state_->gr_context->purgeUnlockedResources( context_state_->gr_context->freeGpuResources();
false /* scratchResourcesOnly */);
} }
} // namespace raster } // namespace raster
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment