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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 | 356 |
357 if (m_forceCompositingMode && !m_compositing) | 357 if (m_forceCompositingMode && !m_compositing) |
358 enableCompositingMode(true); | 358 enableCompositingMode(true); |
359 | 359 |
360 if (!m_needsToRecomputeCompositingRequirements && !m_compositing) | 360 if (!m_needsToRecomputeCompositingRequirements && !m_compositing) |
361 return; | 361 return; |
362 | 362 |
363 switch (updateType) { | 363 switch (updateType) { |
364 case CompositingUpdateAfterStyleChange: | 364 case CompositingUpdateAfterStyleChange: |
365 m_needsToRecomputeCompositingRequirements = true; | 365 m_needsToRecomputeCompositingRequirements = true; |
| 366 m_needsToUpdateLayerTreeGeometry = true; |
366 break; | 367 break; |
367 case CompositingUpdateAfterLayout: | 368 case CompositingUpdateAfterLayout: |
368 m_needsToRecomputeCompositingRequirements = true; | 369 m_needsToRecomputeCompositingRequirements = true; |
369 // FIXME: Ideally we'd be smarter about tracking dirtiness and wouldn't
need a ForceUpdate here. | 370 // FIXME: Ideally we'd be smarter about tracking dirtiness and wouldn't
need a ForceUpdate here. |
370 m_pendingUpdateType = GraphicsLayerUpdater::ForceUpdate; | 371 m_pendingUpdateType = GraphicsLayerUpdater::ForceUpdate; |
371 // FIXME: Ideally we'd be smarter about tracking dirtiness and wouldn't
need a ForceUpdate here. | 372 // FIXME: Ideally we'd be smarter about tracking dirtiness and wouldn't
need a ForceUpdate here. |
372 m_pendingPropertyUpdateType = CompositingPropertyUpdater::ForceUpdate; | 373 m_pendingPropertyUpdateType = CompositingPropertyUpdater::ForceUpdate; |
373 break; | 374 break; |
374 case CompositingUpdateOnScroll: | 375 case CompositingUpdateOnScroll: |
375 m_needsToRecomputeCompositingRequirements = true; // Overlap can change
with scrolling, so need to check for hierarchy updates. | 376 m_needsToRecomputeCompositingRequirements = true; // Overlap can change
with scrolling, so need to check for hierarchy updates. |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 } | 811 } |
811 return update; | 812 return update; |
812 } | 813 } |
813 | 814 |
814 // These are temporary hacks to work around chicken-egg issues while we continue
to refactor the compositing code. | 815 // These are temporary hacks to work around chicken-egg issues while we continue
to refactor the compositing code. |
815 // See crbug.com/339892 for a list of tests that fail if this method is removed. | 816 // See crbug.com/339892 for a list of tests that fail if this method is removed. |
816 void RenderLayerCompositor::applyUpdateLayerCompositingStateChickenEggHacks(Rend
erLayer* layer, CompositingStateTransitionType compositedLayerUpdate) | 817 void RenderLayerCompositor::applyUpdateLayerCompositingStateChickenEggHacks(Rend
erLayer* layer, CompositingStateTransitionType compositedLayerUpdate) |
817 { | 818 { |
818 // See if we need content or clipping layers. Methods called here should ass
ume | 819 // See if we need content or clipping layers. Methods called here should ass
ume |
819 // that the compositing state of descendant layers has not been updated yet. | 820 // that the compositing state of descendant layers has not been updated yet. |
820 if (layer->hasCompositedLayerMapping() && layer->compositedLayerMapping()->u
pdateGraphicsLayerConfiguration(GraphicsLayerUpdater::ForceUpdate)) { | 821 if (layer->hasCompositedLayerMapping() && layer->compositedLayerMapping()->u
pdateGraphicsLayerConfiguration(GraphicsLayerUpdater::ForceUpdate)) |
821 setCompositingLayersNeedRebuild(); | 822 setCompositingLayersNeedRebuild(); |
822 } else if (compositedLayerUpdate == NoCompositingStateChange) { | |
823 if (layer->compositingState() == PaintsIntoOwnBacking || layer->composit
ingState() == HasOwnBackingButPaintsIntoAncestor) | |
824 setCompositingLayersNeedRebuild(); | |
825 } | |
826 | 823 |
827 if (compositedLayerUpdate != NoCompositingStateChange) | 824 if (compositedLayerUpdate != NoCompositingStateChange) |
828 allocateOrClearCompositedLayerMapping(layer, computeCompositedLayerUpdat
e(layer)); | 825 allocateOrClearCompositedLayerMapping(layer, computeCompositedLayerUpdat
e(layer)); |
829 } | 826 } |
830 | 827 |
831 void RenderLayerCompositor::updateLayerCompositingState(RenderLayer* layer, Upda
teLayerCompositingStateOptions options) | 828 void RenderLayerCompositor::updateLayerCompositingState(RenderLayer* layer, Upda
teLayerCompositingStateOptions options) |
832 { | 829 { |
833 updateDirectCompositingReasons(layer); | 830 updateDirectCompositingReasons(layer); |
834 CompositingStateTransitionType compositedLayerUpdate = computeCompositedLaye
rUpdate(layer); | 831 CompositingStateTransitionType compositedLayerUpdate = computeCompositedLaye
rUpdate(layer); |
835 | 832 |
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2150 } else if (graphicsLayer == m_scrollLayer.get()) { | 2147 } else if (graphicsLayer == m_scrollLayer.get()) { |
2151 name = "LocalFrame Scrolling Layer"; | 2148 name = "LocalFrame Scrolling Layer"; |
2152 } else { | 2149 } else { |
2153 ASSERT_NOT_REACHED(); | 2150 ASSERT_NOT_REACHED(); |
2154 } | 2151 } |
2155 | 2152 |
2156 return name; | 2153 return name; |
2157 } | 2154 } |
2158 | 2155 |
2159 } // namespace WebCore | 2156 } // namespace WebCore |
OLD | NEW |