| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 return graphicsLayer.release(); | 220 return graphicsLayer.release(); |
| 221 } | 221 } |
| 222 | 222 |
| 223 void CompositedDeprecatedPaintLayerMapping::createPrimaryGraphicsLayer() | 223 void CompositedDeprecatedPaintLayerMapping::createPrimaryGraphicsLayer() |
| 224 { | 224 { |
| 225 m_graphicsLayer = createGraphicsLayer(m_owningLayer.compositingReasons()); | 225 m_graphicsLayer = createGraphicsLayer(m_owningLayer.compositingReasons()); |
| 226 | 226 |
| 227 updateOpacity(layoutObject()->styleRef()); | 227 updateOpacity(layoutObject()->styleRef()); |
| 228 updateTransform(layoutObject()->styleRef()); | 228 updateTransform(layoutObject()->styleRef()); |
| 229 updateFilters(layoutObject()->styleRef()); | 229 updateFilters(layoutObject()->styleRef()); |
| 230 updateBackdropFilters(layoutObject()->styleRef()); |
| 230 | 231 |
| 231 if (RuntimeEnabledFeatures::cssCompositingEnabled()) { | 232 if (RuntimeEnabledFeatures::cssCompositingEnabled()) { |
| 232 updateLayerBlendMode(layoutObject()->styleRef()); | 233 updateLayerBlendMode(layoutObject()->styleRef()); |
| 233 updateIsRootForIsolatedGroup(); | 234 updateIsRootForIsolatedGroup(); |
| 234 } | 235 } |
| 235 } | 236 } |
| 236 | 237 |
| 237 void CompositedDeprecatedPaintLayerMapping::destroyGraphicsLayers() | 238 void CompositedDeprecatedPaintLayerMapping::destroyGraphicsLayers() |
| 238 { | 239 { |
| 239 if (m_graphicsLayer) | 240 if (m_graphicsLayer) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 269 } | 270 } |
| 270 | 271 |
| 271 m_graphicsLayer->setTransform(t); | 272 m_graphicsLayer->setTransform(t); |
| 272 } | 273 } |
| 273 | 274 |
| 274 void CompositedDeprecatedPaintLayerMapping::updateFilters(const ComputedStyle& s
tyle) | 275 void CompositedDeprecatedPaintLayerMapping::updateFilters(const ComputedStyle& s
tyle) |
| 275 { | 276 { |
| 276 m_graphicsLayer->setFilters(owningLayer().computeFilterOperations(style)); | 277 m_graphicsLayer->setFilters(owningLayer().computeFilterOperations(style)); |
| 277 } | 278 } |
| 278 | 279 |
| 280 void CompositedDeprecatedPaintLayerMapping::updateBackdropFilters(const Computed
Style& style) |
| 281 { |
| 282 m_graphicsLayer->setBackdropFilters(owningLayer().computeBackdropFilterOpera
tions(style)); |
| 283 } |
| 284 |
| 279 void CompositedDeprecatedPaintLayerMapping::updateLayerBlendMode(const ComputedS
tyle& style) | 285 void CompositedDeprecatedPaintLayerMapping::updateLayerBlendMode(const ComputedS
tyle& style) |
| 280 { | 286 { |
| 281 setBlendMode(style.blendMode()); | 287 setBlendMode(style.blendMode()); |
| 282 } | 288 } |
| 283 | 289 |
| 284 void CompositedDeprecatedPaintLayerMapping::updateIsRootForIsolatedGroup() | 290 void CompositedDeprecatedPaintLayerMapping::updateIsRootForIsolatedGroup() |
| 285 { | 291 { |
| 286 bool isolate = m_owningLayer.shouldIsolateCompositedDescendants(); | 292 bool isolate = m_owningLayer.shouldIsolateCompositedDescendants(); |
| 287 | 293 |
| 288 // non stacking context layers should never isolate | 294 // non stacking context layers should never isolate |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 if (!layoutObject()->style()->isRunningTransformAnimationOnCompositor()) | 659 if (!layoutObject()->style()->isRunningTransformAnimationOnCompositor()) |
| 654 updateTransform(layoutObject()->styleRef()); | 660 updateTransform(layoutObject()->styleRef()); |
| 655 | 661 |
| 656 // Set opacity, if it is not animating. | 662 // Set opacity, if it is not animating. |
| 657 if (!layoutObject()->style()->isRunningOpacityAnimationOnCompositor()) | 663 if (!layoutObject()->style()->isRunningOpacityAnimationOnCompositor()) |
| 658 updateOpacity(layoutObject()->styleRef()); | 664 updateOpacity(layoutObject()->styleRef()); |
| 659 | 665 |
| 660 if (!layoutObject()->style()->isRunningFilterAnimationOnCompositor()) | 666 if (!layoutObject()->style()->isRunningFilterAnimationOnCompositor()) |
| 661 updateFilters(layoutObject()->styleRef()); | 667 updateFilters(layoutObject()->styleRef()); |
| 662 | 668 |
| 669 if (!layoutObject()->style()->isRunningBackdropFilterAnimationOnCompositor()
) |
| 670 updateBackdropFilters(layoutObject()->styleRef()); |
| 671 |
| 663 // We compute everything relative to the enclosing compositing layer. | 672 // We compute everything relative to the enclosing compositing layer. |
| 664 IntRect ancestorCompositingBounds; | 673 IntRect ancestorCompositingBounds; |
| 665 if (compositingContainer) { | 674 if (compositingContainer) { |
| 666 ASSERT(compositingContainer->hasCompositedDeprecatedPaintLayerMapping())
; | 675 ASSERT(compositingContainer->hasCompositedDeprecatedPaintLayerMapping())
; |
| 667 ancestorCompositingBounds = compositingContainer->compositedDeprecatedPa
intLayerMapping()->pixelSnappedCompositedBounds(); | 676 ancestorCompositingBounds = compositingContainer->compositedDeprecatedPa
intLayerMapping()->pixelSnappedCompositedBounds(); |
| 668 } | 677 } |
| 669 | 678 |
| 670 IntRect localCompositingBounds; | 679 IntRect localCompositingBounds; |
| 671 IntRect relativeCompositingBounds; | 680 IntRect relativeCompositingBounds; |
| 672 LayoutPoint offsetFromCompositedAncestor; | 681 LayoutPoint offsetFromCompositedAncestor; |
| (...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2385 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2394 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2386 name = "Scrolling Block Selection Layer"; | 2395 name = "Scrolling Block Selection Layer"; |
| 2387 } else { | 2396 } else { |
| 2388 ASSERT_NOT_REACHED(); | 2397 ASSERT_NOT_REACHED(); |
| 2389 } | 2398 } |
| 2390 | 2399 |
| 2391 return name; | 2400 return name; |
| 2392 } | 2401 } |
| 2393 | 2402 |
| 2394 } // namespace blink | 2403 } // namespace blink |
| OLD | NEW |