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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2766943002: Do-not-commit: Count layout tree memory usage
Patch Set: Rebase, add object paint property counter Created 3 years, 9 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: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 641347fed2d55aca27f9b65c598a3f83d5606b98..d1caf43e98d8f9c81dd7eb18aafd33c77f7a6740 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -257,6 +257,17 @@ bool LayoutObject::isLegend() const {
return isHTMLLegendElement(node());
}
+char LayoutObject::approximateHeapMemoryUsage() const {
+ int memory = 0;
+ if (m_style)
+ memory += sizeof(ComputedStyle);
+ if (m_paintProperties) {
+ memory += sizeof(ObjectPaintProperties);
+ memory += m_paintProperties->heapMemoryUsage();
+ }
+ return memory;
+}
+
void LayoutObject::setIsInsideFlowThreadIncludingDescendants(
bool insideFlowThread) {
LayoutObject* next;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/layout/LayoutPagedFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698