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

Unified Diff: cc/tiles/image_controller.h

Issue 2844273004: cc: Make images that can't possibly fit in cache not checker. (Closed)
Patch Set: tests Created 3 years, 8 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
« no previous file with comments | « cc/tiles/gpu_image_decode_cache.cc ('k') | cc/tiles/image_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/image_controller.h
diff --git a/cc/tiles/image_controller.h b/cc/tiles/image_controller.h
index ac79c82a3f6e5211e2682015beb0b987872a91c7..940a7fd842c7a3468ebd7c1f21276e003d9150dc 100644
--- a/cc/tiles/image_controller.h
+++ b/cc/tiles/image_controller.h
@@ -56,6 +56,13 @@ class CC_EXPORT ImageController {
virtual ImageDecodeRequestId QueueImageDecode(
sk_sp<const SkImage> image,
const ImageDecodedCallback& callback);
+ size_t image_cache_max_limit_bytes() const {
+ return image_cache_max_limit_bytes_;
+ }
+
+ void SetMaxImageCacheLimitBytesForTesting(size_t bytes) {
+ image_cache_max_limit_bytes_ = bytes;
+ }
protected:
scoped_refptr<base::SequencedTaskRunner> worker_task_runner_;
@@ -97,6 +104,7 @@ class CC_EXPORT ImageController {
base::flat_map<ImageDecodeRequestId, DrawImage> requested_locked_images_;
base::SequencedTaskRunner* origin_task_runner_ = nullptr;
+ size_t image_cache_max_limit_bytes_ = 0u;
// The variables defined below this lock (aside from weak_ptr_factory_) can
// only be accessed when the lock is acquired.
« no previous file with comments | « cc/tiles/gpu_image_decode_cache.cc ('k') | cc/tiles/image_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698