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

Unified Diff: cc/playback/display_item_list.cc

Issue 1377353003: CL for perf tryjob on linux Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | cc/playback/largest_display_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/display_item_list.cc
diff --git a/cc/playback/display_item_list.cc b/cc/playback/display_item_list.cc
index a9fbfaa37e0b33ddd99f93abacf318b7e22bf037..9acd7d87da969c5b4d02284186597591f4520fde 100644
--- a/cc/playback/display_item_list.cc
+++ b/cc/playback/display_item_list.cc
@@ -35,7 +35,9 @@ bool DisplayItemsTracingEnabled() {
return tracing_enabled;
}
-const int kDefaultNumDisplayItemsToReserve = 100;
+// 16 "typically sized items" is the same as this many large items:
+const int kDefaultNumDisplayItemsToReserve =
+ 8 * TypicalDisplayItemSize() / LargestDisplayItemSize() + 1;
} // namespace
@@ -108,7 +110,7 @@ void DisplayItemList::Raster(SkCanvas* canvas,
void DisplayItemList::ProcessAppendedItemsOnTheFly() {
if (retain_individual_display_items_)
return;
- if (items_.size() >= kDefaultNumDisplayItemsToReserve) {
+ if (items_.size() >= static_cast<size_t>(kDefaultNumDisplayItemsToReserve)) {
ProcessAppendedItems();
// This function exists to keep the |items_| from growing indefinitely if
// we're not going to store them anyway. So the items better be deleted
« no previous file with comments | « no previous file | cc/playback/largest_display_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698