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

Unified Diff: cc/playback/display_item_list.h

Issue 1226503006: cc: More consistent reasoning about display list memory usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: capacity unit test Created 5 years, 5 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/playback/display_item_list.h
diff --git a/cc/playback/display_item_list.h b/cc/playback/display_item_list.h
index 61596e0a667ca4a2fcda3d2303929d3933b3ad81..61449e1b094644cc5cf2b4bb476e6541cde2e331 100644
--- a/cc/playback/display_item_list.h
+++ b/cc/playback/display_item_list.h
@@ -70,7 +70,7 @@ class CC_EXPORT DisplayItemList
bool IsSuitableForGpuRasterization() const;
int ApproximateOpCount() const;
- size_t PictureMemoryUsage() const;
+ size_t ApproximateMemoryUsage() const;
bool RetainsIndividualDisplayItems() const;
@@ -114,13 +114,18 @@ class CC_EXPORT DisplayItemList
gfx::Rect layer_rect_;
bool is_suitable_for_gpu_rasterization_;
int approximate_op_count_;
+
+ // Memory usage due to the cached SkPicture.
size_t picture_memory_usage_;
+ // Memory usage due to external data held by display items.
+ size_t external_memory_usage_;
+
scoped_ptr<PixelRefMap> pixel_refs_;
friend class base::RefCountedThreadSafe<DisplayItemList>;
friend class PixelRefMap::Iterator;
- FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, PictureMemoryUsage);
+ FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, ApproximateMemoryUsage);
DISALLOW_COPY_AND_ASSIGN(DisplayItemList);
};

Powered by Google App Engine
This is Rietveld 408576698