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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.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/svg/LayoutSVGInlineText.h
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h
index dd86be76de94f5ff689717a6962eff9306fdb034..89367ec659cbf2d2d8da8228c995fd2482ba2aec 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h
@@ -72,6 +72,14 @@ class LayoutSVGInlineText final : public LayoutText {
LayoutText::isOfType(type);
}
+ char objectSize() const override { return sizeof(this); }
+ char approximateHeapMemoryUsage() const override {
+ int memory = LayoutText::approximateHeapMemoryUsage();
+ // TODO(pdr): Also add memory from m_characterDataMap.
+ // TODO(pdr): Also add memory from m_metrics.
+ return memory;
+ }
+
PositionWithAffinity positionForPoint(const LayoutPoint&) override;
LayoutRect localCaretRect(
InlineBox*,

Powered by Google App Engine
This is Rietveld 408576698