OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 if (Page* page = this->page()) | 302 if (Page* page = this->page()) |
303 page->chrome()->client()->scheduleCompositingLayerFlush(); | 303 page->chrome()->client()->scheduleCompositingLayerFlush(); |
304 } | 304 } |
305 } | 305 } |
306 | 306 |
307 bool RenderLayerCompositor::hasAnyAdditionalCompositedLayers(const RenderLayer*
rootLayer) const | 307 bool RenderLayerCompositor::hasAnyAdditionalCompositedLayers(const RenderLayer*
rootLayer) const |
308 { | 308 { |
309 return m_compositedLayerCount > (rootLayer->isComposited() ? 1 : 0); | 309 return m_compositedLayerCount > (rootLayer->isComposited() ? 1 : 0); |
310 } | 310 } |
311 | 311 |
| 312 void RenderLayerCompositor::updateDescendantsAreContiguousInStackingOrderRecursi
ve(RenderLayer* layer) |
| 313 { |
| 314 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) |
| 315 updateDescendantsAreContiguousInStackingOrderRecursive(child); |
| 316 layer->updateDescendantDependentFlags(); |
| 317 layer->updateDescendantsAreContiguousInStackingOrder(); |
| 318 } |
| 319 |
| 320 void RenderLayerCompositor::updateNeedsCompositedScrolling(RenderLayer* layer) |
| 321 { |
| 322 layer->updateNeedsCompositedScrolling(); |
| 323 |
| 324 // These values depend on our composited scrolling status. |
| 325 layer->updateIsNormalFlowOnly(); |
| 326 layer->updateSelfPaintingLayer(); |
| 327 |
| 328 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib
ling()) |
| 329 updateNeedsCompositedScrolling(child); |
| 330 } |
| 331 |
| 332 void RenderLayerCompositor::updateLayoutDependentState() |
| 333 { |
| 334 RenderLayer* updateRoot = rootRenderLayer(); |
| 335 updateRoot->updateDescendantDependentFlags(); |
| 336 updateDescendantsAreContiguousInStackingOrderRecursive(updateRoot); |
| 337 updateNeedsCompositedScrolling(updateRoot); |
| 338 } |
| 339 |
312 void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update
Type, RenderLayer* updateRoot) | 340 void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update
Type, RenderLayer* updateRoot) |
313 { | 341 { |
314 // Avoid updating the layers with old values. Compositing layers will be upd
ated after the layout is finished. | 342 // Avoid updating the layers with old values. Compositing layers will be upd
ated after the layout is finished. |
315 if (m_renderView->needsLayout()) | 343 if (m_renderView->needsLayout()) |
316 return; | 344 return; |
317 | 345 |
318 if (m_forceCompositingMode && !m_compositing) | 346 if (m_forceCompositingMode && !m_compositing) |
319 enableCompositingMode(true); | 347 enableCompositingMode(true); |
320 | 348 |
321 if (!m_reevaluateCompositingAfterLayout && !m_compositing) | 349 if (!m_reevaluateCompositingAfterLayout && !m_compositing) |
(...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2783 info.addMember(m_layerForOverhangAreas, "layerForOverhangAreas"); | 2811 info.addMember(m_layerForOverhangAreas, "layerForOverhangAreas"); |
2784 info.addMember(m_contentShadowLayer, "contentShadowLayer"); | 2812 info.addMember(m_contentShadowLayer, "contentShadowLayer"); |
2785 info.addMember(m_layerForTopOverhangArea, "layerForTopOverhangArea"); | 2813 info.addMember(m_layerForTopOverhangArea, "layerForTopOverhangArea"); |
2786 info.addMember(m_layerForBottomOverhangArea, "layerForBottomOverhangArea"); | 2814 info.addMember(m_layerForBottomOverhangArea, "layerForBottomOverhangArea"); |
2787 info.addMember(m_layerForHeader, "layerForHeader"); | 2815 info.addMember(m_layerForHeader, "layerForHeader"); |
2788 info.addMember(m_layerForFooter, "layerForFooter"); | 2816 info.addMember(m_layerForFooter, "layerForFooter"); |
2789 #endif | 2817 #endif |
2790 } | 2818 } |
2791 | 2819 |
2792 } // namespace WebCore | 2820 } // namespace WebCore |
OLD | NEW |