| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 m_graphicsLayer = createGraphicsLayer(m_owningLayer.compositingReasons()); | 209 m_graphicsLayer = createGraphicsLayer(m_owningLayer.compositingReasons()); |
| 210 | 210 |
| 211 #if !OS(ANDROID) | 211 #if !OS(ANDROID) |
| 212 if (m_isMainFrameRenderViewLayer) | 212 if (m_isMainFrameRenderViewLayer) |
| 213 m_graphicsLayer->contentLayer()->setDrawCheckerboardForMissingTiles(true
); | 213 m_graphicsLayer->contentLayer()->setDrawCheckerboardForMissingTiles(true
); |
| 214 #endif | 214 #endif |
| 215 | 215 |
| 216 updateOpacity(renderer()->style()); | 216 updateOpacity(renderer()->style()); |
| 217 updateTransform(renderer()->style()); | 217 updateTransform(renderer()->style()); |
| 218 updateFilters(renderer()->style()); | 218 updateFilters(renderer()->style()); |
| 219 updateHasGpuRasterizationHint(renderer()->style()); |
| 219 | 220 |
| 220 if (RuntimeEnabledFeatures::cssCompositingEnabled()) { | 221 if (RuntimeEnabledFeatures::cssCompositingEnabled()) { |
| 221 updateLayerBlendMode(renderer()->style()); | 222 updateLayerBlendMode(renderer()->style()); |
| 222 updateIsRootForIsolatedGroup(); | 223 updateIsRootForIsolatedGroup(); |
| 223 } | 224 } |
| 224 } | 225 } |
| 225 | 226 |
| 226 void CompositedLayerMapping::destroyGraphicsLayers() | 227 void CompositedLayerMapping::destroyGraphicsLayers() |
| 227 { | 228 { |
| 228 if (m_graphicsLayer) | 229 if (m_graphicsLayer) |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 void CompositedLayerMapping::updateIsRootForIsolatedGroup() | 287 void CompositedLayerMapping::updateIsRootForIsolatedGroup() |
| 287 { | 288 { |
| 288 bool isolate = m_owningLayer.shouldIsolateCompositedDescendants(); | 289 bool isolate = m_owningLayer.shouldIsolateCompositedDescendants(); |
| 289 | 290 |
| 290 // non stacking context layers should never isolate | 291 // non stacking context layers should never isolate |
| 291 ASSERT(m_owningLayer.stackingNode()->isStackingContext() || !isolate); | 292 ASSERT(m_owningLayer.stackingNode()->isStackingContext() || !isolate); |
| 292 | 293 |
| 293 m_graphicsLayer->setIsRootForIsolatedGroup(isolate); | 294 m_graphicsLayer->setIsRootForIsolatedGroup(isolate); |
| 294 } | 295 } |
| 295 | 296 |
| 297 void CompositedLayerMapping::updateHasGpuRasterizationHint(const RenderStyle* st
yle) |
| 298 { |
| 299 m_graphicsLayer->setHasGpuRasterizationHint(style->hasWillChangeGpuRasteriza
tionHint()); |
| 300 } |
| 301 |
| 296 void CompositedLayerMapping::updateContentsOpaque() | 302 void CompositedLayerMapping::updateContentsOpaque() |
| 297 { | 303 { |
| 298 // For non-root layers, background is always painted by the primary graphics
layer. | 304 // For non-root layers, background is always painted by the primary graphics
layer. |
| 299 ASSERT(m_isMainFrameRenderViewLayer || !m_backgroundLayer); | 305 ASSERT(m_isMainFrameRenderViewLayer || !m_backgroundLayer); |
| 300 if (m_backgroundLayer) { | 306 if (m_backgroundLayer) { |
| 301 m_graphicsLayer->setContentsOpaque(false); | 307 m_graphicsLayer->setContentsOpaque(false); |
| 302 m_backgroundLayer->setContentsOpaque(m_owningLayer.backgroundIsKnownToBe
OpaqueInRect(compositedBounds())); | 308 m_backgroundLayer->setContentsOpaque(m_owningLayer.backgroundIsKnownToBe
OpaqueInRect(compositedBounds())); |
| 303 } else { | 309 } else { |
| 304 m_graphicsLayer->setContentsOpaque(m_owningLayer.backgroundIsKnownToBeOp
aqueInRect(compositedBounds())); | 310 m_graphicsLayer->setContentsOpaque(m_owningLayer.backgroundIsKnownToBeOp
aqueInRect(compositedBounds())); |
| 305 } | 311 } |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 | 851 |
| 846 // We can't make this call in RenderLayerCompositor::allocateOrClearComposit
edLayerMapping | 852 // We can't make this call in RenderLayerCompositor::allocateOrClearComposit
edLayerMapping |
| 847 // since it depends on whether compAncestor draws content, which gets update
d later. | 853 // since it depends on whether compAncestor draws content, which gets update
d later. |
| 848 updateRequiresOwnBackingStoreForAncestorReasons(compAncestor); | 854 updateRequiresOwnBackingStoreForAncestorReasons(compAncestor); |
| 849 | 855 |
| 850 if (RuntimeEnabledFeatures::cssCompositingEnabled()) { | 856 if (RuntimeEnabledFeatures::cssCompositingEnabled()) { |
| 851 updateLayerBlendMode(style); | 857 updateLayerBlendMode(style); |
| 852 updateIsRootForIsolatedGroup(); | 858 updateIsRootForIsolatedGroup(); |
| 853 } | 859 } |
| 854 | 860 |
| 861 updateHasGpuRasterizationHint(renderer()->style()); |
| 855 updateContentsRect(); | 862 updateContentsRect(); |
| 856 updateBackgroundColor(); | 863 updateBackgroundColor(); |
| 857 updateDrawsContent(); | 864 updateDrawsContent(); |
| 858 updateContentsOpaque(); | 865 updateContentsOpaque(); |
| 859 updateAfterWidgetResize(); | 866 updateAfterWidgetResize(); |
| 860 updateRenderingContext(); | 867 updateRenderingContext(); |
| 861 updateShouldFlattenTransform(); | 868 updateShouldFlattenTransform(); |
| 862 updateChildrenTransform(); | 869 updateChildrenTransform(); |
| 863 registerScrollingLayers(); | 870 registerScrollingLayers(); |
| 864 | 871 |
| (...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2115 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2122 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2116 name = "Scrolling Contents Layer"; | 2123 name = "Scrolling Contents Layer"; |
| 2117 } else { | 2124 } else { |
| 2118 ASSERT_NOT_REACHED(); | 2125 ASSERT_NOT_REACHED(); |
| 2119 } | 2126 } |
| 2120 | 2127 |
| 2121 return name; | 2128 return name; |
| 2122 } | 2129 } |
| 2123 | 2130 |
| 2124 } // namespace WebCore | 2131 } // namespace WebCore |
| OLD | NEW |