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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.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/LayoutSVGShape.h
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h
index 6942444dab4b766c5cf786c5477deb890a865c7b..3d7ece8a5bf8472e63834b5a00c306844a86374e 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h
@@ -125,6 +125,15 @@ class LayoutSVGShape : public LayoutSVGModelObject {
FloatRect m_strokeBoundingBox;
LayoutSVGShapeRareData& ensureRareData() const;
+ char objectSize() const override { return sizeof(this); }
+ char approximateHeapMemoryUsage() const override {
+ int memory = LayoutSVGModelObject::approximateHeapMemoryUsage();
+ // TODO(pdr): Include memory from m_path.
+ if (m_rareData)
+ memory += sizeof(LayoutSVGShapeRareData);
+ return memory;
+ }
+
private:
// Hit-detection separated for the fill and the stroke
bool fillContains(const FloatPoint&,
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGTSpan.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698