OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 3690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3701 m_clipRects = 0; | 3701 m_clipRects = 0; |
3702 #ifndef NDEBUG | 3702 #ifndef NDEBUG |
3703 m_clipRectsRoot = 0; | 3703 m_clipRectsRoot = 0; |
3704 #endif | 3704 #endif |
3705 } | 3705 } |
3706 } | 3706 } |
3707 | 3707 |
3708 #if USE(ACCELERATED_COMPOSITING) | 3708 #if USE(ACCELERATED_COMPOSITING) |
3709 RenderLayerBacking* RenderLayer::ensureBacking() | 3709 RenderLayerBacking* RenderLayer::ensureBacking() |
3710 { | 3710 { |
3711 if (!m_backing) | 3711 if (!m_backing) { |
3712 m_backing = adoptPtr(new RenderLayerBacking(this)); | 3712 m_backing = adoptPtr(new RenderLayerBacking(this)); |
| 3713 compositor()->layerBecameComposited(this); |
| 3714 } |
3713 return m_backing.get(); | 3715 return m_backing.get(); |
3714 } | 3716 } |
3715 | 3717 |
3716 void RenderLayer::clearBacking() | 3718 void RenderLayer::clearBacking() |
3717 { | 3719 { |
| 3720 if (m_backing && !renderer()->documentBeingDestroyed()) |
| 3721 compositor()->layerBecameNonComposited(this); |
3718 m_backing.clear(); | 3722 m_backing.clear(); |
3719 } | 3723 } |
3720 | 3724 |
3721 bool RenderLayer::hasCompositedMask() const | 3725 bool RenderLayer::hasCompositedMask() const |
3722 { | 3726 { |
3723 return m_backing && m_backing->hasMaskLayer(); | 3727 return m_backing && m_backing->hasMaskLayer(); |
3724 } | 3728 } |
3725 | 3729 |
3726 GraphicsLayer* RenderLayer::layerForHorizontalScrollbar() const | 3730 GraphicsLayer* RenderLayer::layerForHorizontalScrollbar() const |
3727 { | 3731 { |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4240 } | 4244 } |
4241 } | 4245 } |
4242 | 4246 |
4243 void showLayerTree(const WebCore::RenderObject* renderer) | 4247 void showLayerTree(const WebCore::RenderObject* renderer) |
4244 { | 4248 { |
4245 if (!renderer) | 4249 if (!renderer) |
4246 return; | 4250 return; |
4247 showLayerTree(renderer->enclosingLayer()); | 4251 showLayerTree(renderer->enclosingLayer()); |
4248 } | 4252 } |
4249 #endif | 4253 #endif |
OLD | NEW |