Index: cc/tiles/gpu_image_decode_controller.cc |
diff --git a/cc/tiles/gpu_image_decode_controller.cc b/cc/tiles/gpu_image_decode_controller.cc |
index 1c213d52faa49cff619ce8a9c54e347d42260f67..152a943ed5617ca7cfe68fbe81588eaacd879c7c 100644 |
--- a/cc/tiles/gpu_image_decode_controller.cc |
+++ b/cc/tiles/gpu_image_decode_controller.cc |
@@ -1134,4 +1134,10 @@ bool GpuImageDecodeController::DiscardableIsLockedForTesting( |
return image_data->decode.is_locked(); |
} |
+void GpuImageDecodeController::OnMemoryStateChange( |
+ memory_coordinator::mojom::MemoryState state) { |
+ if (state == memory_coordinator::mojom::MemoryState::SUSPENDED) |
+ SetShouldAggressivelyFreeResources(true); |
ericrk
2016/08/31 17:50:32
Setting this is stateful, so we need to be careful
|
+} |
+ |
} // namespace cc |