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

Unified Diff: cc/tiles/gpu_image_decode_controller.h

Issue 2367953002: Implement OnMemoryStateChange for Various CC Classes (Closed)
Patch Set: Created 4 years, 3 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/gpu_image_decode_controller.h
diff --git a/cc/tiles/gpu_image_decode_controller.h b/cc/tiles/gpu_image_decode_controller.h
index 5a202ee700a5d8815d3537944f652e4a553e2fee..e8d823d3e02dea286178fbfa501021a2806904cc 100644
--- a/cc/tiles/gpu_image_decode_controller.h
+++ b/cc/tiles/gpu_image_decode_controller.h
@@ -320,10 +320,10 @@ class CC_EXPORT GpuImageDecodeController
using InUseCache = std::unordered_map<InUseCacheKey, InUseCacheEntry>;
InUseCache in_use_cache_;
- size_t cached_items_limit_;
- size_t cached_bytes_limit_;
- size_t bytes_used_;
const size_t max_gpu_image_bytes_;
+ size_t cached_bytes_limit_ = max_gpu_image_bytes_;
+ size_t bytes_used_ = 0;
+ base::MemoryState memory_state_ = base::MemoryState::NORMAL;
// We can't release GPU backed SkImages without holding the context lock,
// so we add them to this list and defer deletion until the next time the lock

Powered by Google App Engine
This is Rietveld 408576698