| Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| index aabe1c5f5f715dabeeb6687319411f2a189aab07..bd6d311d459f8042bf7f8f0c37613f2609c402bd 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| @@ -211,6 +211,28 @@ LayoutRect PaintLayer::visualRect() const {
|
| return m_layoutObject.visualRect();
|
| }
|
|
|
| +char PaintLayer::approximateHeapMemoryUsage() const {
|
| + int memory = 0;
|
| + if (m_ancestorDependentCompositingInputs)
|
| + memory += sizeof(AncestorDependentCompositingInputs);
|
| + if (m_scrollableArea) {
|
| + // TODO(pdr): Include the additional heap allocations in
|
| + // PaintLayerScrollableArea.
|
| + memory += sizeof(PaintLayerScrollableArea);
|
| + }
|
| + if (m_ancestorDependentCompositingInputs)
|
| + memory += sizeof(AncestorDependentCompositingInputs);
|
| + if (m_clipRectsCache)
|
| + memory += sizeof(ClipRectsCache);
|
| + if (m_stackingNode)
|
| + memory += sizeof(PaintLayerStackingNode);
|
| + if (m_previousPaintingClipRects)
|
| + memory += sizeof(ClipRects);
|
| + if (m_rareData)
|
| + memory += sizeof(PaintLayerRareData);
|
| + return memory;
|
| +}
|
| +
|
| PaintLayerCompositor* PaintLayer::compositor() const {
|
| if (!layoutObject().view())
|
| return 0;
|
|
|