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

Unified Diff: Source/platform/graphics/paint/DisplayItemList.cpp

Issue 1205703003: Add tracing for ContentLayerDelegate paintContents and DisplayItemList commit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « Source/platform/graphics/paint/DisplayItemList.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/paint/DisplayItemList.cpp
diff --git a/Source/platform/graphics/paint/DisplayItemList.cpp b/Source/platform/graphics/paint/DisplayItemList.cpp
index 84f2d8b87bc52c658f17bf27bd43cda2791e3198..d4762fa9b765cad05b8f4b92f192bd44d2caf3e9 100644
--- a/Source/platform/graphics/paint/DisplayItemList.cpp
+++ b/Source/platform/graphics/paint/DisplayItemList.cpp
@@ -66,6 +66,9 @@ void DisplayItemList::add(WTF::PassOwnPtr<DisplayItem> displayItem)
ASSERT(!m_constructionDisabled);
ASSERT(!skippingCache() || !displayItem->isCached());
+ if (DisplayItem::isCachedType(displayItem->type()))
+ ++m_numCachedItems;
+
#if ENABLE(ASSERT)
// Verify noop begin/end pairs have been removed.
if (!m_newDisplayItems.isEmpty() && m_newDisplayItems.last().isBegin() && !m_newDisplayItems.last().drawsContent())
@@ -215,7 +218,8 @@ DisplayItems::Iterator DisplayItemList::findOutOfOrderCachedItemForward(DisplayI
// and the average number of (Drawing|BeginSubtree)DisplayItems per client.
void DisplayItemList::commitNewDisplayItems()
{
- TRACE_EVENT0("blink,benchmark", "DisplayItemList::commitNewDisplayItems");
+ TRACE_EVENT2("blink,benchmark", "DisplayItemList::commitNewDisplayItems", "current_display_list_size", (int)m_currentDisplayItems.size(),
+ "num_non_cached_new_items", (int)m_newDisplayItems.size() - m_numCachedItems);
// These data structures are used during painting only.
m_clientScopeIdMap.clear();
@@ -235,6 +239,7 @@ void DisplayItemList::commitNewDisplayItems()
#endif
m_currentDisplayItems.swap(m_newDisplayItems);
m_validlyCachedClientsDirty = true;
+ m_numCachedItems = 0;
return;
}
@@ -320,6 +325,7 @@ void DisplayItemList::commitNewDisplayItems()
m_validlyCachedClientsDirty = true;
m_currentDisplayItems.clear();
m_currentDisplayItems.swap(updatedList);
+ m_numCachedItems = 0;
}
void DisplayItemList::updateValidlyCachedClientsIfNeeded() const
« no previous file with comments | « Source/platform/graphics/paint/DisplayItemList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698