Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Unified Diff: cc/tiles/software_image_decode_controller.cc

Issue 2286583002: Make cc::SoftwareImageDecodeController, cc::ResourcePool, and cc::StagingBufferPoo… (Closed)
Patch Set: Fixed DEPS. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/tiles/software_image_decode_controller.cc
diff --git a/cc/tiles/software_image_decode_controller.cc b/cc/tiles/software_image_decode_controller.cc
index 34f5f7244d70ebcd28852495799ad852493b46d2..5c92a974e7c90125ffd21870140625e4bcecfd14 100644
--- a/cc/tiles/software_image_decode_controller.cc
+++ b/cc/tiles/software_image_decode_controller.cc
@@ -1078,4 +1078,12 @@ size_t SoftwareImageDecodeController::MemoryBudget::GetCurrentUsageSafe()
return current_usage_bytes_.ValueOrDie();
}
+void SoftwareImageDecodeController::OnMemoryStateChange(
+ memory_coordinator::mojom::MemoryState state) {
+ if (state == memory_coordinator::mojom::MemoryState::SUSPENDED) {
vmpstr 2016/08/31 17:45:51 What are the different states that we can be in?
+ decoded_images_.Clear();
+ at_raster_decoded_images_.Clear();
vmpstr 2016/08/31 17:45:51 I don't think this is safe to do, because both of
+ }
+}
+
} // namespace cc
« cc/tiles/gpu_image_decode_controller.cc ('K') | « cc/tiles/software_image_decode_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698