OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 3320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3331 return true; | 3331 return true; |
3332 return renderer()->document().lifecycle().state() >= DocumentLifecycle::InCo
mpositingUpdate; | 3332 return renderer()->document().lifecycle().state() >= DocumentLifecycle::InCo
mpositingUpdate; |
3333 } | 3333 } |
3334 | 3334 |
3335 CompositedLayerMappingPtr RenderLayer::compositedLayerMapping() const | 3335 CompositedLayerMappingPtr RenderLayer::compositedLayerMapping() const |
3336 { | 3336 { |
3337 ASSERT(isAllowedToQueryCompositingState()); | 3337 ASSERT(isAllowedToQueryCompositingState()); |
3338 return m_compositedLayerMapping.get(); | 3338 return m_compositedLayerMapping.get(); |
3339 } | 3339 } |
3340 | 3340 |
| 3341 GraphicsLayer* RenderLayer::graphicsLayerBacking() const |
| 3342 { |
| 3343 switch (compositingState()) { |
| 3344 case NotComposited: |
| 3345 return 0; |
| 3346 case PaintsIntoGroupedBacking: |
| 3347 return groupedMapping()->squashingLayer(); |
| 3348 default: |
| 3349 return compositedLayerMapping()->mainGraphicsLayer(); |
| 3350 } |
| 3351 } |
| 3352 |
| 3353 GraphicsLayer* RenderLayer::graphicsLayerBackingForScrolling() const |
| 3354 { |
| 3355 switch (compositingState()) { |
| 3356 case NotComposited: |
| 3357 return 0; |
| 3358 case PaintsIntoGroupedBacking: |
| 3359 return groupedMapping()->squashingLayer(); |
| 3360 default: |
| 3361 return compositedLayerMapping()->scrollingContentsLayer() ? compositedLa
yerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsL
ayer(); |
| 3362 } |
| 3363 } |
| 3364 |
3341 CompositedLayerMappingPtr RenderLayer::ensureCompositedLayerMapping() | 3365 CompositedLayerMappingPtr RenderLayer::ensureCompositedLayerMapping() |
3342 { | 3366 { |
3343 if (!m_compositedLayerMapping) { | 3367 if (!m_compositedLayerMapping) { |
3344 m_compositedLayerMapping = adoptPtr(new CompositedLayerMapping(*this)); | 3368 m_compositedLayerMapping = adoptPtr(new CompositedLayerMapping(*this)); |
3345 m_compositedLayerMapping->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdat
eSubtree); | 3369 m_compositedLayerMapping->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdat
eSubtree); |
3346 | 3370 |
3347 updateOrRemoveFilterEffectRenderer(); | 3371 updateOrRemoveFilterEffectRenderer(); |
3348 | 3372 |
3349 if (RuntimeEnabledFeatures::cssCompositingEnabled()) | 3373 if (RuntimeEnabledFeatures::cssCompositingEnabled()) |
3350 compositedLayerMapping()->setBlendMode(m_blendInfo.blendMode()); | 3374 compositedLayerMapping()->setBlendMode(m_blendInfo.blendMode()); |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3762 } | 3786 } |
3763 } | 3787 } |
3764 | 3788 |
3765 void showLayerTree(const WebCore::RenderObject* renderer) | 3789 void showLayerTree(const WebCore::RenderObject* renderer) |
3766 { | 3790 { |
3767 if (!renderer) | 3791 if (!renderer) |
3768 return; | 3792 return; |
3769 showLayerTree(renderer->enclosingLayer()); | 3793 showLayerTree(renderer->enclosingLayer()); |
3770 } | 3794 } |
3771 #endif | 3795 #endif |
OLD | NEW |