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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.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/LayoutView.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.h b/third_party/WebKit/Source/core/layout/LayoutView.h
index 3192c97ec23fd641c042b42269fd93c80264a010..a8170e3e1ab1ca647b250d2e715ca325c2c56a3a 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.h
+++ b/third_party/WebKit/Source/core/layout/LayoutView.h
@@ -75,6 +75,12 @@ class CORE_EXPORT LayoutView final : public LayoutBlockFlow {
void clearHitTestCache();
const char* name() const override { return "LayoutView"; }
+ char objectSize() const override { return sizeof(this); }
+ char approximateHeapMemoryUsage() const override {
+ int memory = LayoutBlockFlow::approximateHeapMemoryUsage();
+ // TODO(pdr): Include additional heap memory.
+ return memory;
+ }
bool isOfType(LayoutObjectType type) const override {
return type == LayoutObjectLayoutView || LayoutBlockFlow::isOfType(type);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutVideo.h ('k') | third_party/WebKit/Source/core/layout/LayoutWordBreak.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698