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

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

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.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index 1a10febda3a228e71f7df05f6c5f0ba7d636f1b9..22291aac1d3ea61533d5d7c85b0daf0719c73d95 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -639,6 +639,11 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
return isOfType(LayoutObjectSVGResourceFilterPrimitive);
}
+ // Total size of this object.
+ virtual char objectSize() const { return sizeof(this); }
+ // Total size of this object plus any heap-allocated memory.
+ virtual char approximateHeapMemoryUsage() const;
+
// FIXME: Those belong into a SVG specific base-class for all layoutObjects
// (see above). Unfortunately we don't have such a class yet, because it's not
// possible for all layoutObjects to inherit from LayoutSVGObject ->

Powered by Google App Engine
This is Rietveld 408576698