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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutView.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 bool hitTest(HitTestResult&); 68 bool hitTest(HitTestResult&);
69 bool hitTestNoLifecycleUpdate(HitTestResult&); 69 bool hitTestNoLifecycleUpdate(HitTestResult&);
70 70
71 // Returns the total count of calls to HitTest, for testing. 71 // Returns the total count of calls to HitTest, for testing.
72 unsigned hitTestCount() const { return m_hitTestCount; } 72 unsigned hitTestCount() const { return m_hitTestCount; }
73 unsigned hitTestCacheHits() const { return m_hitTestCacheHits; } 73 unsigned hitTestCacheHits() const { return m_hitTestCacheHits; }
74 74
75 void clearHitTestCache(); 75 void clearHitTestCache();
76 76
77 const char* name() const override { return "LayoutView"; } 77 const char* name() const override { return "LayoutView"; }
78 char objectSize() const override { return sizeof(this); }
79 char approximateHeapMemoryUsage() const override {
80 int memory = LayoutBlockFlow::approximateHeapMemoryUsage();
81 // TODO(pdr): Include additional heap memory.
82 return memory;
83 }
78 84
79 bool isOfType(LayoutObjectType type) const override { 85 bool isOfType(LayoutObjectType type) const override {
80 return type == LayoutObjectLayoutView || LayoutBlockFlow::isOfType(type); 86 return type == LayoutObjectLayoutView || LayoutBlockFlow::isOfType(type);
81 } 87 }
82 88
83 PaintLayerType layerTypeRequired() const override { return NormalPaintLayer; } 89 PaintLayerType layerTypeRequired() const override { return NormalPaintLayer; }
84 90
85 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override; 91 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override;
86 92
87 void layout() override; 93 void layout() override;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 unsigned m_hitTestCount; 331 unsigned m_hitTestCount;
326 unsigned m_hitTestCacheHits; 332 unsigned m_hitTestCacheHits;
327 Persistent<HitTestCache> m_hitTestCache; 333 Persistent<HitTestCache> m_hitTestCache;
328 }; 334 };
329 335
330 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); 336 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView());
331 337
332 } // namespace blink 338 } // namespace blink
333 339
334 #endif // LayoutView_h 340 #endif // LayoutView_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutVideo.h ('k') | third_party/WebKit/Source/core/layout/LayoutWordBreak.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698