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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.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/LayoutBox.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h
index aca950dfdaef5226338fab9bb65e51c04b10e851..22eda42244395cfac14b4db0fdc4e1d4944aad17 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.h
@@ -1480,6 +1480,16 @@ class CORE_EXPORT LayoutBox : public LayoutBoxModelObject {
bool skipContainingBlockForPercentHeightCalculation(
const LayoutBox* containingBlock) const;
+ char objectSize() const override { return sizeof(this); }
+ char approximateHeapMemoryUsage() const override {
+ int memory = LayoutBoxModelObject::approximateHeapMemoryUsage();
+ if (m_overflow)
+ memory += sizeof(BoxOverflowModel);
+ if (m_rareData)
+ memory += sizeof(LayoutBoxRareData);
+ return memory;
+ }
+
private:
void updateShapeOutsideInfoAfterStyleChange(const ComputedStyle&,
const ComputedStyle* oldStyle);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.h ('k') | third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698