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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGText.h

Issue 2766943002: Do-not-commit: Count layout tree memory usage
Patch Set: Rebase, add object paint property counter Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 bool needsReordering() const { return m_needsReordering; } 56 bool needsReordering() const { return m_needsReordering; }
57 const Vector<LayoutSVGInlineText*>& descendantTextNodes() const { 57 const Vector<LayoutSVGInlineText*>& descendantTextNodes() const {
58 return m_descendantTextNodes; 58 return m_descendantTextNodes;
59 } 59 }
60 60
61 void subtreeChildWasAdded(); 61 void subtreeChildWasAdded();
62 void subtreeChildWillBeRemoved(); 62 void subtreeChildWillBeRemoved();
63 void subtreeTextDidChange(); 63 void subtreeTextDidChange();
64 64
65 const char* name() const override { return "LayoutSVGText"; } 65 const char* name() const override { return "LayoutSVGText"; }
66 char objectSize() const override { return sizeof(this); }
67 char approximateHeapMemoryUsage() const override {
68 int memory = LayoutSVGBlock::approximateHeapMemoryUsage();
69 // TODO(pdr): Include memory from m_descendantTextNodes.
70 return memory;
71 }
66 72
67 private: 73 private:
68 bool isOfType(LayoutObjectType type) const override { 74 bool isOfType(LayoutObjectType type) const override {
69 return type == LayoutObjectSVGText || LayoutSVGBlock::isOfType(type); 75 return type == LayoutObjectSVGText || LayoutSVGBlock::isOfType(type);
70 } 76 }
71 77
72 void paint(const PaintInfo&, const LayoutPoint&) const override; 78 void paint(const PaintInfo&, const LayoutPoint&) const override;
73 bool nodeAtFloatPoint(HitTestResult&, 79 bool nodeAtFloatPoint(HitTestResult&,
74 const FloatPoint& pointInParent, 80 const FloatPoint& pointInParent,
75 HitTestAction) override; 81 HitTestAction) override;
(...skipping 20 matching lines...) Expand all
96 bool m_needsTransformUpdate : 1; 102 bool m_needsTransformUpdate : 1;
97 bool m_needsTextMetricsUpdate : 1; 103 bool m_needsTextMetricsUpdate : 1;
98 Vector<LayoutSVGInlineText*> m_descendantTextNodes; 104 Vector<LayoutSVGInlineText*> m_descendantTextNodes;
99 }; 105 };
100 106
101 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGText, isSVGText()); 107 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGText, isSVGText());
102 108
103 } // namespace blink 109 } // namespace blink
104 110
105 #endif 111 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698