| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 m_graphicsLayer = createGraphicsLayer(m_owningLayer.compositingReasons()); | 226 m_graphicsLayer = createGraphicsLayer(m_owningLayer.compositingReasons()); |
| 227 | 227 |
| 228 #if !OS(ANDROID) | 228 #if !OS(ANDROID) |
| 229 if (m_isMainFrameRenderViewLayer) | 229 if (m_isMainFrameRenderViewLayer) |
| 230 m_graphicsLayer->contentLayer()->setDrawCheckerboardForMissingTiles(true
); | 230 m_graphicsLayer->contentLayer()->setDrawCheckerboardForMissingTiles(true
); |
| 231 #endif | 231 #endif |
| 232 | 232 |
| 233 updateOpacity(renderer()->style()); | 233 updateOpacity(renderer()->style()); |
| 234 updateTransform(renderer()->style()); | 234 updateTransform(renderer()->style()); |
| 235 updateFilters(renderer()->style()); | 235 updateFilters(renderer()->style()); |
| 236 updateHasGpuRasterizationHint(renderer()->style()); | |
| 237 | 236 |
| 238 if (RuntimeEnabledFeatures::cssCompositingEnabled()) { | 237 if (RuntimeEnabledFeatures::cssCompositingEnabled()) { |
| 239 updateLayerBlendMode(renderer()->style()); | 238 updateLayerBlendMode(renderer()->style()); |
| 240 updateIsRootForIsolatedGroup(); | 239 updateIsRootForIsolatedGroup(); |
| 241 } | 240 } |
| 242 } | 241 } |
| 243 | 242 |
| 244 void CompositedLayerMapping::destroyGraphicsLayers() | 243 void CompositedLayerMapping::destroyGraphicsLayers() |
| 245 { | 244 { |
| 246 if (m_graphicsLayer) | 245 if (m_graphicsLayer) |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 void CompositedLayerMapping::updateIsRootForIsolatedGroup() | 303 void CompositedLayerMapping::updateIsRootForIsolatedGroup() |
| 305 { | 304 { |
| 306 bool isolate = m_owningLayer.shouldIsolateCompositedDescendants(); | 305 bool isolate = m_owningLayer.shouldIsolateCompositedDescendants(); |
| 307 | 306 |
| 308 // non stacking context layers should never isolate | 307 // non stacking context layers should never isolate |
| 309 ASSERT(m_owningLayer.stackingNode()->isStackingContext() || !isolate); | 308 ASSERT(m_owningLayer.stackingNode()->isStackingContext() || !isolate); |
| 310 | 309 |
| 311 m_graphicsLayer->setIsRootForIsolatedGroup(isolate); | 310 m_graphicsLayer->setIsRootForIsolatedGroup(isolate); |
| 312 } | 311 } |
| 313 | 312 |
| 314 void CompositedLayerMapping::updateHasGpuRasterizationHint(const RenderStyle* st
yle) | |
| 315 { | |
| 316 m_graphicsLayer->setHasGpuRasterizationHint(style->hasWillChangeGpuRasteriza
tionHint()); | |
| 317 } | |
| 318 | |
| 319 void CompositedLayerMapping::updateContentsOpaque() | 313 void CompositedLayerMapping::updateContentsOpaque() |
| 320 { | 314 { |
| 321 // For non-root layers, background is always painted by the primary graphics
layer. | 315 // For non-root layers, background is always painted by the primary graphics
layer. |
| 322 ASSERT(m_isMainFrameRenderViewLayer || !m_backgroundLayer); | 316 ASSERT(m_isMainFrameRenderViewLayer || !m_backgroundLayer); |
| 323 if (m_backgroundLayer) { | 317 if (m_backgroundLayer) { |
| 324 m_graphicsLayer->setContentsOpaque(false); | 318 m_graphicsLayer->setContentsOpaque(false); |
| 325 m_backgroundLayer->setContentsOpaque(m_owningLayer.backgroundIsKnownToBe
OpaqueInRect(compositedBounds())); | 319 m_backgroundLayer->setContentsOpaque(m_owningLayer.backgroundIsKnownToBe
OpaqueInRect(compositedBounds())); |
| 326 } else { | 320 } else { |
| 327 m_graphicsLayer->setContentsOpaque(m_owningLayer.backgroundIsKnownToBeOp
aqueInRect(compositedBounds())); | 321 m_graphicsLayer->setContentsOpaque(m_owningLayer.backgroundIsKnownToBeOp
aqueInRect(compositedBounds())); |
| 328 } | 322 } |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 } | 830 } |
| 837 | 831 |
| 838 if (m_owningLayer.scrollableArea() && m_owningLayer.scrollableArea()->scroll
sOverflow()) | 832 if (m_owningLayer.scrollableArea() && m_owningLayer.scrollableArea()->scroll
sOverflow()) |
| 839 m_owningLayer.scrollableArea()->positionOverflowControls(); | 833 m_owningLayer.scrollableArea()->positionOverflowControls(); |
| 840 | 834 |
| 841 if (RuntimeEnabledFeatures::cssCompositingEnabled()) { | 835 if (RuntimeEnabledFeatures::cssCompositingEnabled()) { |
| 842 updateLayerBlendMode(style); | 836 updateLayerBlendMode(style); |
| 843 updateIsRootForIsolatedGroup(); | 837 updateIsRootForIsolatedGroup(); |
| 844 } | 838 } |
| 845 | 839 |
| 846 updateHasGpuRasterizationHint(renderer()->style()); | |
| 847 updateContentsRect(); | 840 updateContentsRect(); |
| 848 updateBackgroundColor(); | 841 updateBackgroundColor(); |
| 849 updateDrawsContent(); | 842 updateDrawsContent(); |
| 850 updateContentsOpaque(); | 843 updateContentsOpaque(); |
| 851 updateAfterWidgetResize(); | 844 updateAfterWidgetResize(); |
| 852 updateRenderingContext(); | 845 updateRenderingContext(); |
| 853 updateShouldFlattenTransform(); | 846 updateShouldFlattenTransform(); |
| 854 updateChildrenTransform(); | 847 updateChildrenTransform(); |
| 855 updateScrollParent(compositor()->acceleratedCompositingForOverflowScrollEnab
led() ? m_owningLayer.scrollParent() : 0); | 848 updateScrollParent(compositor()->acceleratedCompositingForOverflowScrollEnab
led() ? m_owningLayer.scrollParent() : 0); |
| 856 registerScrollingLayers(); | 849 registerScrollingLayers(); |
| (...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2113 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2106 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2114 name = "Scrolling Contents Layer"; | 2107 name = "Scrolling Contents Layer"; |
| 2115 } else { | 2108 } else { |
| 2116 ASSERT_NOT_REACHED(); | 2109 ASSERT_NOT_REACHED(); |
| 2117 } | 2110 } |
| 2118 | 2111 |
| 2119 return name; | 2112 return name; |
| 2120 } | 2113 } |
| 2121 | 2114 |
| 2122 } // namespace WebCore | 2115 } // namespace WebCore |
| OLD | NEW |