| 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 graphicsLayer->setCompositingReasons(reasons); | 220 graphicsLayer->setCompositingReasons(reasons); |
| 221 graphicsLayer->setSquashingDisallowedReasons(squashingDisallowedReasons); | 221 graphicsLayer->setSquashingDisallowedReasons(squashingDisallowedReasons); |
| 222 if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode()) | 222 if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode()) |
| 223 graphicsLayer->setOwnerNodeId(DOMNodeIds::idForNode(owningNode)); | 223 graphicsLayer->setOwnerNodeId(DOMNodeIds::idForNode(owningNode)); |
| 224 | 224 |
| 225 return graphicsLayer.release(); | 225 return graphicsLayer.release(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void CompositedLayerMapping::createPrimaryGraphicsLayer() | 228 void CompositedLayerMapping::createPrimaryGraphicsLayer() |
| 229 { | 229 { |
| 230 m_graphicsLayer = createGraphicsLayer(m_owningLayer.getCompositingReasons(),
m_owningLayer.squashingDisallowedReasons()); | 230 m_graphicsLayer = createGraphicsLayer(m_owningLayer.getCompositingReasons(),
m_owningLayer.getSquashingDisallowedReasons()); |
| 231 | 231 |
| 232 updateOpacity(layoutObject()->styleRef()); | 232 updateOpacity(layoutObject()->styleRef()); |
| 233 updateTransform(layoutObject()->styleRef()); | 233 updateTransform(layoutObject()->styleRef()); |
| 234 updateFilters(layoutObject()->styleRef()); | 234 updateFilters(layoutObject()->styleRef()); |
| 235 updateBackdropFilters(layoutObject()->styleRef()); | 235 updateBackdropFilters(layoutObject()->styleRef()); |
| 236 | 236 |
| 237 if (RuntimeEnabledFeatures::cssCompositingEnabled()) { | 237 if (RuntimeEnabledFeatures::cssCompositingEnabled()) { |
| 238 updateLayerBlendMode(layoutObject()->styleRef()); | 238 updateLayerBlendMode(layoutObject()->styleRef()); |
| 239 updateIsRootForIsolatedGroup(); | 239 updateIsRootForIsolatedGroup(); |
| 240 } | 240 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 innerCompositor->frameViewDidChangeLocation(flooredIntPoint(contents
Box().location())); | 340 innerCompositor->frameViewDidChangeLocation(flooredIntPoint(contents
Box().location())); |
| 341 } | 341 } |
| 342 } | 342 } |
| 343 } | 343 } |
| 344 | 344 |
| 345 void CompositedLayerMapping::updateCompositingReasons() | 345 void CompositedLayerMapping::updateCompositingReasons() |
| 346 { | 346 { |
| 347 // All other layers owned by this mapping will have the same compositing rea
son | 347 // All other layers owned by this mapping will have the same compositing rea
son |
| 348 // for their lifetime, so they are initialized only when created. | 348 // for their lifetime, so they are initialized only when created. |
| 349 m_graphicsLayer->setCompositingReasons(m_owningLayer.getCompositingReasons()
); | 349 m_graphicsLayer->setCompositingReasons(m_owningLayer.getCompositingReasons()
); |
| 350 m_graphicsLayer->setSquashingDisallowedReasons(m_owningLayer.squashingDisall
owedReasons()); | 350 m_graphicsLayer->setSquashingDisallowedReasons(m_owningLayer.getSquashingDis
allowedReasons()); |
| 351 } | 351 } |
| 352 | 352 |
| 353 bool CompositedLayerMapping::owningLayerClippedByLayerNotAboveCompositedAncestor
(const PaintLayer* scrollParent) | 353 bool CompositedLayerMapping::owningLayerClippedByLayerNotAboveCompositedAncestor
(const PaintLayer* scrollParent) |
| 354 { | 354 { |
| 355 if (!m_owningLayer.parent()) | 355 if (!m_owningLayer.parent()) |
| 356 return false; | 356 return false; |
| 357 | 357 |
| 358 const PaintLayer* compositingAncestor = m_owningLayer.enclosingLayerWithComp
ositedLayerMapping(ExcludeSelf); | 358 const PaintLayer* compositingAncestor = m_owningLayer.enclosingLayerWithComp
ositedLayerMapping(ExcludeSelf); |
| 359 if (!compositingAncestor) | 359 if (!compositingAncestor) |
| 360 return false; | 360 return false; |
| (...skipping 2191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2552 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2552 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2553 name = "Scrolling Contents Layer"; | 2553 name = "Scrolling Contents Layer"; |
| 2554 } else { | 2554 } else { |
| 2555 ASSERT_NOT_REACHED(); | 2555 ASSERT_NOT_REACHED(); |
| 2556 } | 2556 } |
| 2557 | 2557 |
| 2558 return name; | 2558 return name; |
| 2559 } | 2559 } |
| 2560 | 2560 |
| 2561 } // namespace blink | 2561 } // namespace blink |
| OLD | NEW |