OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. | 7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 { | 47 { |
48 // Our layer should have been destroyed and cleared by now | 48 // Our layer should have been destroyed and cleared by now |
49 ASSERT(!hasLayer()); | 49 ASSERT(!hasLayer()); |
50 ASSERT(!m_layer); | 50 ASSERT(!m_layer); |
51 } | 51 } |
52 | 52 |
53 void RenderLayerModelObject::destroyLayer() | 53 void RenderLayerModelObject::destroyLayer() |
54 { | 54 { |
55 ASSERT(!hasLayer()); // Callers should have already called setHasLayer(false
) | 55 ASSERT(!hasLayer()); // Callers should have already called setHasLayer(false
) |
56 ASSERT(m_layer); | 56 ASSERT(m_layer); |
57 m_layer->destroy(renderArena()); | 57 m_layer->destroy(); |
58 m_layer = 0; | 58 m_layer = 0; |
59 } | 59 } |
60 | 60 |
61 void RenderLayerModelObject::ensureLayer() | 61 void RenderLayerModelObject::ensureLayer() |
62 { | 62 { |
63 if (m_layer) | 63 if (m_layer) |
64 return; | 64 return; |
65 | 65 |
66 m_layer = new (renderArena()) RenderLayer(this); | 66 m_layer = new RenderLayer(this); |
67 setHasLayer(true); | 67 setHasLayer(true); |
68 m_layer->insertOnlyThisLayer(); | 68 m_layer->insertOnlyThisLayer(); |
69 } | 69 } |
70 | 70 |
71 bool RenderLayerModelObject::hasSelfPaintingLayer() const | 71 bool RenderLayerModelObject::hasSelfPaintingLayer() const |
72 { | 72 { |
73 return m_layer && m_layer->isSelfPaintingLayer(); | 73 return m_layer && m_layer->isSelfPaintingLayer(); |
74 } | 74 } |
75 | 75 |
76 void RenderLayerModelObject::willBeDestroyed() | 76 void RenderLayerModelObject::willBeDestroyed() |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 void RenderLayerModelObject::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf
o) const | 185 void RenderLayerModelObject::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf
o) const |
186 { | 186 { |
187 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering)
; | 187 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering)
; |
188 RenderObject::reportMemoryUsage(memoryObjectInfo); | 188 RenderObject::reportMemoryUsage(memoryObjectInfo); |
189 info.addWeakPointer(m_layer); | 189 info.addWeakPointer(m_layer); |
190 } | 190 } |
191 | 191 |
192 } // namespace WebCore | 192 } // namespace WebCore |
193 | 193 |
OLD | NEW |