| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 } | 204 } |
| 205 | 205 |
| 206 String PaintLayer::debugName() const { | 206 String PaintLayer::debugName() const { |
| 207 return layoutObject().debugName(); | 207 return layoutObject().debugName(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 LayoutRect PaintLayer::visualRect() const { | 210 LayoutRect PaintLayer::visualRect() const { |
| 211 return m_layoutObject.visualRect(); | 211 return m_layoutObject.visualRect(); |
| 212 } | 212 } |
| 213 | 213 |
| 214 char PaintLayer::approximateHeapMemoryUsage() const { |
| 215 int memory = 0; |
| 216 if (m_ancestorDependentCompositingInputs) |
| 217 memory += sizeof(AncestorDependentCompositingInputs); |
| 218 if (m_scrollableArea) { |
| 219 // TODO(pdr): Include the additional heap allocations in |
| 220 // PaintLayerScrollableArea. |
| 221 memory += sizeof(PaintLayerScrollableArea); |
| 222 } |
| 223 if (m_ancestorDependentCompositingInputs) |
| 224 memory += sizeof(AncestorDependentCompositingInputs); |
| 225 if (m_clipRectsCache) |
| 226 memory += sizeof(ClipRectsCache); |
| 227 if (m_stackingNode) |
| 228 memory += sizeof(PaintLayerStackingNode); |
| 229 if (m_previousPaintingClipRects) |
| 230 memory += sizeof(ClipRects); |
| 231 if (m_rareData) |
| 232 memory += sizeof(PaintLayerRareData); |
| 233 return memory; |
| 234 } |
| 235 |
| 214 PaintLayerCompositor* PaintLayer::compositor() const { | 236 PaintLayerCompositor* PaintLayer::compositor() const { |
| 215 if (!layoutObject().view()) | 237 if (!layoutObject().view()) |
| 216 return 0; | 238 return 0; |
| 217 return layoutObject().view()->compositor(); | 239 return layoutObject().view()->compositor(); |
| 218 } | 240 } |
| 219 | 241 |
| 220 void PaintLayer::contentChanged(ContentChangeType changeType) { | 242 void PaintLayer::contentChanged(ContentChangeType changeType) { |
| 221 // updateLayerCompositingState will query compositingReasons for accelerated | 243 // updateLayerCompositingState will query compositingReasons for accelerated |
| 222 // overflow scrolling. This is tripped by | 244 // overflow scrolling. This is tripped by |
| 223 // LayoutTests/compositing/content-changed-chicken-egg.html | 245 // LayoutTests/compositing/content-changed-chicken-egg.html |
| (...skipping 3026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3250 } | 3272 } |
| 3251 | 3273 |
| 3252 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3274 void showLayerTree(const blink::LayoutObject* layoutObject) { |
| 3253 if (!layoutObject) { | 3275 if (!layoutObject) { |
| 3254 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3276 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
| 3255 return; | 3277 return; |
| 3256 } | 3278 } |
| 3257 showLayerTree(layoutObject->enclosingLayer()); | 3279 showLayerTree(layoutObject->enclosingLayer()); |
| 3258 } | 3280 } |
| 3259 #endif | 3281 #endif |
| OLD | NEW |