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

Free fewer resources when idle in oop raster

freeGpuResources evicts harder to regenerate Skia caches, so use the
slightly lighter weight purgeUnlockedResources when idle for oop raster.
This matches the behavior of gpu raster (see: ContextCacheController).

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: Ia954629b13f8d5fcb50cbd314976e8558b1609d4
Reviewed-on: https://chromium-review.googlesource.com/1141102Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Commit-Queue: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576180}
parent c7e7f2e1
......@@ -46,10 +46,9 @@ void GrCacheController::PurgeGrCache(uint64_t idle_id) {
return;
}
// TODO(khushalsagar): Replace with purgeUnlockedResources which retains the
// text cache.
context_state_->context->MakeCurrent(context_state_->surface.get());
context_state_->gr_context->freeGpuResources();
context_state_->gr_context->purgeUnlockedResources(
false /* scratchResourcesOnly */);
}
} // 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