| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 PaintLayer* oldSquashedLayer = m_squashedLayers[i].paintLayer; | 193 PaintLayer* oldSquashedLayer = m_squashedLayers[i].paintLayer; |
| 194 // Assert on incorrect mappings between layers and groups | 194 // Assert on incorrect mappings between layers and groups |
| 195 ASSERT(oldSquashedLayer->groupedMapping() == this); | 195 ASSERT(oldSquashedLayer->groupedMapping() == this); |
| 196 if (oldSquashedLayer->groupedMapping() == this) { | 196 if (oldSquashedLayer->groupedMapping() == this) { |
| 197 oldSquashedLayer->setGroupedMapping( | 197 oldSquashedLayer->setGroupedMapping( |
| 198 0, PaintLayer::DoNotInvalidateLayerAndRemoveFromMapping); | 198 0, PaintLayer::DoNotInvalidateLayerAndRemoveFromMapping); |
| 199 oldSquashedLayer->setLostGroupedMapping(true); | 199 oldSquashedLayer->setLostGroupedMapping(true); |
| 200 } | 200 } |
| 201 } | 201 } |
| 202 | 202 |
| 203 updateClippingLayers(false, false); | 203 updateClippingLayers(false, false, false); |
| 204 updateOverflowControlsLayers(false, false, false, false); | 204 updateOverflowControlsLayers(false, false, false, false); |
| 205 updateChildTransformLayer(false); | 205 updateChildTransformLayer(false); |
| 206 updateForegroundLayer(false); | 206 updateForegroundLayer(false); |
| 207 updateBackgroundLayer(false); | 207 updateBackgroundLayer(false); |
| 208 updateMaskLayer(false); | 208 updateMaskLayer(false); |
| 209 updateChildClippingMaskLayer(false); | 209 updateChildClippingMaskLayer(false); |
| 210 updateScrollingLayers(false); | 210 updateScrollingLayers(false); |
| 211 updateSquashingLayers(false); | 211 updateSquashingLayers(false); |
| 212 destroyGraphicsLayers(); | 212 destroyGraphicsLayers(); |
| 213 } | 213 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 237 updateStickyConstraints(layoutObject()->styleRef()); | 237 updateStickyConstraints(layoutObject()->styleRef()); |
| 238 updateLayerBlendMode(layoutObject()->styleRef()); | 238 updateLayerBlendMode(layoutObject()->styleRef()); |
| 239 updateIsRootForIsolatedGroup(); | 239 updateIsRootForIsolatedGroup(); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void CompositedLayerMapping::destroyGraphicsLayers() { | 242 void CompositedLayerMapping::destroyGraphicsLayers() { |
| 243 if (m_graphicsLayer) | 243 if (m_graphicsLayer) |
| 244 m_graphicsLayer->removeFromParent(); | 244 m_graphicsLayer->removeFromParent(); |
| 245 | 245 |
| 246 m_ancestorClippingLayer = nullptr; | 246 m_ancestorClippingLayer = nullptr; |
| 247 m_ancestorClippingMaskLayer = nullptr; |
| 247 m_graphicsLayer = nullptr; | 248 m_graphicsLayer = nullptr; |
| 248 m_foregroundLayer = nullptr; | 249 m_foregroundLayer = nullptr; |
| 249 m_backgroundLayer = nullptr; | 250 m_backgroundLayer = nullptr; |
| 250 m_childContainmentLayer = nullptr; | 251 m_childContainmentLayer = nullptr; |
| 251 m_childTransformLayer = nullptr; | 252 m_childTransformLayer = nullptr; |
| 252 m_maskLayer = nullptr; | 253 m_maskLayer = nullptr; |
| 253 m_childClippingMaskLayer = nullptr; | 254 m_childClippingMaskLayer = nullptr; |
| 254 | 255 |
| 255 m_scrollingLayer = nullptr; | 256 m_scrollingLayer = nullptr; |
| 256 m_scrollingContentsLayer = nullptr; | 257 m_scrollingContentsLayer = nullptr; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 } | 448 } |
| 448 | 449 |
| 449 void CompositedLayerMapping::updateCompositingReasons() { | 450 void CompositedLayerMapping::updateCompositingReasons() { |
| 450 // All other layers owned by this mapping will have the same compositing | 451 // All other layers owned by this mapping will have the same compositing |
| 451 // reason for their lifetime, so they are initialized only when created. | 452 // reason for their lifetime, so they are initialized only when created. |
| 452 m_graphicsLayer->setCompositingReasons(m_owningLayer.getCompositingReasons()); | 453 m_graphicsLayer->setCompositingReasons(m_owningLayer.getCompositingReasons()); |
| 453 m_graphicsLayer->setSquashingDisallowedReasons( | 454 m_graphicsLayer->setSquashingDisallowedReasons( |
| 454 m_owningLayer.getSquashingDisallowedReasons()); | 455 m_owningLayer.getSquashingDisallowedReasons()); |
| 455 } | 456 } |
| 456 | 457 |
| 457 bool CompositedLayerMapping:: | 458 void CompositedLayerMapping:: |
| 458 owningLayerClippedByLayerNotAboveCompositedAncestor( | 459 owningLayerClippedOrMaskedByLayerNotAboveCompositedAncestor( |
| 459 const PaintLayer* scrollParent) { | 460 const PaintLayer* scrollParent, |
| 461 bool& owningLayerIsClipped, |
| 462 bool& owningLayerIsMasked) { |
| 463 owningLayerIsClipped = false; |
| 464 owningLayerIsMasked = false; |
| 465 |
| 460 if (!m_owningLayer.parent()) | 466 if (!m_owningLayer.parent()) |
| 461 return false; | 467 return; |
| 462 | 468 |
| 463 const PaintLayer* compositingAncestor = | 469 const PaintLayer* compositingAncestor = |
| 464 m_owningLayer.enclosingLayerWithCompositedLayerMapping(ExcludeSelf); | 470 m_owningLayer.enclosingLayerWithCompositedLayerMapping(ExcludeSelf); |
| 465 if (!compositingAncestor) | 471 if (!compositingAncestor) |
| 466 return false; | 472 return; |
| 467 | 473 |
| 468 const LayoutObject* clippingContainer = m_owningLayer.clippingContainer(); | 474 const LayoutObject* clippingContainer = m_owningLayer.clippingContainer(); |
| 469 if (!clippingContainer) | 475 if (!clippingContainer) |
| 470 return false; | 476 return; |
| 471 | 477 |
| 472 if (clippingContainer->enclosingLayer() == scrollParent) | 478 if (clippingContainer->enclosingLayer() == scrollParent) |
| 473 return false; | 479 return; |
| 474 | 480 |
| 475 if (clippingContainer->enclosingLayer()->hasRootScrollerAsDescendant()) | 481 if (clippingContainer->enclosingLayer()->hasRootScrollerAsDescendant()) |
| 476 return false; | 482 return; |
| 477 | 483 |
| 478 if (compositingAncestor->layoutObject()->isDescendantOf(clippingContainer)) | 484 if (compositingAncestor->layoutObject()->isDescendantOf(clippingContainer)) |
| 479 return false; | 485 return; |
| 486 |
| 487 if (clippingContainer->enclosingLayer()->hasRootScrollerAsDescendant()) |
| 488 return; |
| 480 | 489 |
| 481 // We ignore overflow clip here; we want composited overflow content to | 490 // We ignore overflow clip here; we want composited overflow content to |
| 482 // behave as if it lives in an unclipped universe so it can prepaint, etc. | 491 // behave as if it lives in an unclipped universe so it can prepaint, etc. |
| 483 // This means that we need to check if we are actually clipped before | 492 // This means that we need to check if we are actually clipped before |
| 484 // setting up m_ancestorClippingLayer otherwise | 493 // setting up m_ancestorClippingLayer otherwise |
| 485 // updateAncestorClippingLayerGeometry will fail as the clip rect will be | 494 // updateAncestorClippingLayerGeometry will fail as the clip rect will be |
| 486 // infinite. | 495 // infinite. |
| 487 // FIXME: this should use cached clip rects, but this sometimes give | 496 // FIXME: this should use cached clip rects, but this sometimes give |
| 488 // inaccurate results (and trips the ASSERTS in PaintLayerClipper). | 497 // inaccurate results (and trips the ASSERTS in PaintLayerClipper). |
| 489 ClipRectsContext clipRectsContext(compositingAncestor, UncachedClipRects, | 498 ClipRectsContext clipRectsContext(compositingAncestor, UncachedClipRects, |
| 490 IgnoreOverlayScrollbarSize); | 499 IgnoreOverlayScrollbarSize); |
| 491 clipRectsContext.setIgnoreOverflowClip(); | 500 clipRectsContext.setIgnoreOverflowClip(); |
| 492 IntRect parentClipRect = pixelSnappedIntRect( | 501 IntRect parentClipRect = pixelSnappedIntRect( |
| 493 m_owningLayer.clipper().backgroundClipRect(clipRectsContext).rect()); | 502 m_owningLayer.clipper().backgroundClipRect(clipRectsContext).rect()); |
| 494 return parentClipRect != LayoutRect::infiniteIntRect(); | 503 owningLayerIsClipped = parentClipRect != LayoutRect::infiniteIntRect(); |
| 504 |
| 505 DCHECK(clippingContainer->style()); |
| 506 owningLayerIsMasked = |
| 507 owningLayerIsClipped && clippingContainer->style()->hasBorderRadius(); |
| 495 } | 508 } |
| 496 | 509 |
| 497 const PaintLayer* CompositedLayerMapping::scrollParent() { | 510 const PaintLayer* CompositedLayerMapping::scrollParent() { |
| 498 const PaintLayer* scrollParent = m_owningLayer.scrollParent(); | 511 const PaintLayer* scrollParent = m_owningLayer.scrollParent(); |
| 499 if (scrollParent && !scrollParent->needsCompositedScrolling()) | 512 if (scrollParent && !scrollParent->needsCompositedScrolling()) |
| 500 return nullptr; | 513 return nullptr; |
| 501 return scrollParent; | 514 return scrollParent; |
| 502 } | 515 } |
| 503 | 516 |
| 504 bool CompositedLayerMapping::updateGraphicsLayerConfiguration() { | 517 bool CompositedLayerMapping::updateGraphicsLayerConfiguration() { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 needsDescendantsClippingLayer = false; | 553 needsDescendantsClippingLayer = false; |
| 541 | 554 |
| 542 const PaintLayer* scrollParent = this->scrollParent(); | 555 const PaintLayer* scrollParent = this->scrollParent(); |
| 543 | 556 |
| 544 // This is required because compositing layers are parented according to the | 557 // This is required because compositing layers are parented according to the |
| 545 // z-order hierarchy, yet clipping goes down the layoutObject hierarchy. Thus, | 558 // z-order hierarchy, yet clipping goes down the layoutObject hierarchy. Thus, |
| 546 // a PaintLayer can be clipped by a PaintLayer that is an ancestor in the | 559 // a PaintLayer can be clipped by a PaintLayer that is an ancestor in the |
| 547 // layoutObject hierarchy, but a sibling in the z-order hierarchy. Further, | 560 // layoutObject hierarchy, but a sibling in the z-order hierarchy. Further, |
| 548 // that sibling need not be composited at all. In such scenarios, an ancestor | 561 // that sibling need not be composited at all. In such scenarios, an ancestor |
| 549 // clipping layer is necessary to apply the composited clip for this layer. | 562 // clipping layer is necessary to apply the composited clip for this layer. |
| 550 bool needsAncestorClip = | 563 bool needsAncestorClip = false; |
| 551 owningLayerClippedByLayerNotAboveCompositedAncestor(scrollParent); | 564 bool needsAncestorClippingMask = false; |
| 552 | 565 owningLayerClippedOrMaskedByLayerNotAboveCompositedAncestor( |
| 553 if (updateClippingLayers(needsAncestorClip, needsDescendantsClippingLayer)) | 566 scrollParent, needsAncestorClip, needsAncestorClippingMask); |
| 567 if (updateClippingLayers(needsAncestorClip, needsAncestorClippingMask, |
| 568 needsDescendantsClippingLayer)) |
| 554 layerConfigChanged = true; | 569 layerConfigChanged = true; |
| 555 | 570 |
| 556 bool scrollingConfigChanged = false; | 571 bool scrollingConfigChanged = false; |
| 557 if (updateScrollingLayers(m_owningLayer.needsCompositedScrolling())) { | 572 if (updateScrollingLayers(m_owningLayer.needsCompositedScrolling())) { |
| 558 layerConfigChanged = true; | 573 layerConfigChanged = true; |
| 559 scrollingConfigChanged = true; | 574 scrollingConfigChanged = true; |
| 560 } | 575 } |
| 561 | 576 |
| 562 if (updateOverflowControlsLayers( | 577 if (updateOverflowControlsLayers( |
| 563 requiresHorizontalScrollbarLayer(), requiresVerticalScrollbarLayer(), | 578 requiresHorizontalScrollbarLayer(), requiresVerticalScrollbarLayer(), |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1051 m_ancestorClippingLayer->setPosition( | 1066 m_ancestorClippingLayer->setPosition( |
| 1052 FloatPoint(parentClipRect.location() - graphicsLayerParentLocation)); | 1067 FloatPoint(parentClipRect.location() - graphicsLayerParentLocation)); |
| 1053 m_ancestorClippingLayer->setSize(FloatSize(parentClipRect.size())); | 1068 m_ancestorClippingLayer->setSize(FloatSize(parentClipRect.size())); |
| 1054 | 1069 |
| 1055 // backgroundRect is relative to compositingContainer, so subtract | 1070 // backgroundRect is relative to compositingContainer, so subtract |
| 1056 // snappedOffsetFromCompositedAncestor.X/snappedOffsetFromCompositedAncestor.Y | 1071 // snappedOffsetFromCompositedAncestor.X/snappedOffsetFromCompositedAncestor.Y |
| 1057 // to get back to local coords. | 1072 // to get back to local coords. |
| 1058 m_ancestorClippingLayer->setOffsetFromLayoutObject( | 1073 m_ancestorClippingLayer->setOffsetFromLayoutObject( |
| 1059 parentClipRect.location() - snappedOffsetFromCompositedAncestor); | 1074 parentClipRect.location() - snappedOffsetFromCompositedAncestor); |
| 1060 | 1075 |
| 1076 if (m_ancestorClippingMaskLayer) { |
| 1077 m_ancestorClippingMaskLayer->setSize(m_ancestorClippingLayer->size()); |
| 1078 m_ancestorClippingMaskLayer->setNeedsDisplay(); |
| 1079 } |
| 1080 |
| 1061 // The primary layer is then parented in, and positioned relative to this | 1081 // The primary layer is then parented in, and positioned relative to this |
| 1062 // clipping layer. | 1082 // clipping layer. |
| 1063 graphicsLayerParentLocation = parentClipRect.location(); | 1083 graphicsLayerParentLocation = parentClipRect.location(); |
| 1064 } | 1084 } |
| 1065 | 1085 |
| 1066 void CompositedLayerMapping::updateOverflowControlsHostLayerGeometry( | 1086 void CompositedLayerMapping::updateOverflowControlsHostLayerGeometry( |
| 1067 const PaintLayer* compositingStackingContext, | 1087 const PaintLayer* compositingStackingContext, |
| 1068 const PaintLayer* compositingContainer, | 1088 const PaintLayer* compositingContainer, |
| 1069 IntPoint graphicsLayerParentLocation) { | 1089 IntPoint graphicsLayerParentLocation) { |
| 1070 if (!m_overflowControlsHostLayer) | 1090 if (!m_overflowControlsHostLayer) |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 } | 1585 } |
| 1566 | 1586 |
| 1567 // FIXME: we could refine this to only allocate backings for one of these | 1587 // FIXME: we could refine this to only allocate backings for one of these |
| 1568 // layers if possible. | 1588 // layers if possible. |
| 1569 if (m_foregroundLayer) | 1589 if (m_foregroundLayer) |
| 1570 m_foregroundLayer->setDrawsContent(hasPaintedContent); | 1590 m_foregroundLayer->setDrawsContent(hasPaintedContent); |
| 1571 | 1591 |
| 1572 if (m_backgroundLayer) | 1592 if (m_backgroundLayer) |
| 1573 m_backgroundLayer->setDrawsContent(hasPaintedContent); | 1593 m_backgroundLayer->setDrawsContent(hasPaintedContent); |
| 1574 | 1594 |
| 1595 if (m_ancestorClippingMaskLayer) |
| 1596 m_ancestorClippingMaskLayer->setDrawsContent(true); |
| 1597 |
| 1575 if (m_maskLayer) | 1598 if (m_maskLayer) |
| 1576 m_maskLayer->setDrawsContent(true); | 1599 m_maskLayer->setDrawsContent(true); |
| 1577 | 1600 |
| 1578 if (m_childClippingMaskLayer) | 1601 if (m_childClippingMaskLayer) |
| 1579 m_childClippingMaskLayer->setDrawsContent(true); | 1602 m_childClippingMaskLayer->setDrawsContent(true); |
| 1580 } | 1603 } |
| 1581 | 1604 |
| 1582 void CompositedLayerMapping::updateChildrenTransform() { | 1605 void CompositedLayerMapping::updateChildrenTransform() { |
| 1583 if (GraphicsLayer* childTransformLayer = this->childTransformLayer()) { | 1606 if (GraphicsLayer* childTransformLayer = this->childTransformLayer()) { |
| 1584 childTransformLayer->setTransform(owningLayer().perspectiveTransform()); | 1607 childTransformLayer->setTransform(owningLayer().perspectiveTransform()); |
| 1585 childTransformLayer->setTransformOrigin(owningLayer().perspectiveOrigin()); | 1608 childTransformLayer->setTransformOrigin(owningLayer().perspectiveOrigin()); |
| 1586 } | 1609 } |
| 1587 | 1610 |
| 1588 updateShouldFlattenTransform(); | 1611 updateShouldFlattenTransform(); |
| 1589 } | 1612 } |
| 1590 | 1613 |
| 1591 // Return true if the layers changed. | 1614 // Return true if the layers changed. |
| 1592 bool CompositedLayerMapping::updateClippingLayers(bool needsAncestorClip, | 1615 bool CompositedLayerMapping::updateClippingLayers( |
| 1593 bool needsDescendantClip) { | 1616 bool needsAncestorClip, |
| 1617 bool needsAncestorClippingMask, |
| 1618 bool needsDescendantClip) { |
| 1594 bool layersChanged = false; | 1619 bool layersChanged = false; |
| 1595 | 1620 |
| 1596 if (needsAncestorClip) { | 1621 if (needsAncestorClip) { |
| 1597 if (!m_ancestorClippingLayer) { | 1622 if (!m_ancestorClippingLayer) { |
| 1598 m_ancestorClippingLayer = | 1623 m_ancestorClippingLayer = |
| 1599 createGraphicsLayer(CompositingReasonLayerForAncestorClip); | 1624 createGraphicsLayer(CompositingReasonLayerForAncestorClip); |
| 1600 m_ancestorClippingLayer->setMasksToBounds(true); | 1625 m_ancestorClippingLayer->setMasksToBounds(true); |
| 1601 m_ancestorClippingLayer->setShouldFlattenTransform(false); | 1626 m_ancestorClippingLayer->setShouldFlattenTransform(false); |
| 1627 if (needsAncestorClippingMask) { |
| 1628 m_ancestorClippingMaskLayer = |
| 1629 createGraphicsLayer(CompositingReasonLayerForAncestorClippingMask); |
| 1630 m_ancestorClippingMaskLayer->setPaintingPhase( |
| 1631 GraphicsLayerPaintAncestorClippingMask); |
| 1632 m_ancestorClippingLayer->setMaskLayer( |
| 1633 m_ancestorClippingMaskLayer.get()); |
| 1634 } else if (!needsAncestorClippingMask) { |
| 1635 if (m_ancestorClippingMaskLayer) { |
| 1636 m_ancestorClippingMaskLayer = nullptr; |
| 1637 m_ancestorClippingLayer->setMaskLayer(nullptr); |
| 1638 } |
| 1639 } |
| 1602 layersChanged = true; | 1640 layersChanged = true; |
| 1603 } | 1641 } |
| 1604 } else if (m_ancestorClippingLayer) { | 1642 } else if (m_ancestorClippingLayer) { |
| 1643 if (m_ancestorClippingMaskLayer) { |
| 1644 m_ancestorClippingMaskLayer->removeFromParent(); |
| 1645 m_ancestorClippingMaskLayer = nullptr; |
| 1646 } |
| 1605 m_ancestorClippingLayer->removeFromParent(); | 1647 m_ancestorClippingLayer->removeFromParent(); |
| 1606 m_ancestorClippingLayer = nullptr; | 1648 m_ancestorClippingLayer = nullptr; |
| 1607 layersChanged = true; | 1649 layersChanged = true; |
| 1608 } | 1650 } |
| 1609 | 1651 |
| 1610 if (needsDescendantClip) { | 1652 if (needsDescendantClip) { |
| 1611 // We don't need a child containment layer if we're the main frame layout | 1653 // We don't need a child containment layer if we're the main frame layout |
| 1612 // view layer. It's redundant as the frame clip above us will handle this | 1654 // view layer. It's redundant as the frame clip above us will handle this |
| 1613 // clipping. | 1655 // clipping. |
| 1614 if (!m_childContainmentLayer && !m_isMainFrameLayoutViewLayer) { | 1656 if (!m_childContainmentLayer && !m_isMainFrameLayoutViewLayer) { |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2136 // Only the topmost layer has a scroll parent. All other layers have a null | 2178 // Only the topmost layer has a scroll parent. All other layers have a null |
| 2137 // scroll parent. | 2179 // scroll parent. |
| 2138 if (layer != topmostLayer) | 2180 if (layer != topmostLayer) |
| 2139 clipParent = 0; | 2181 clipParent = 0; |
| 2140 | 2182 |
| 2141 scrollingCoordinator->updateClipParentForGraphicsLayer(layer, clipParent); | 2183 scrollingCoordinator->updateClipParentForGraphicsLayer(layer, clipParent); |
| 2142 } | 2184 } |
| 2143 | 2185 |
| 2144 void CompositedLayerMapping::updateClipParent(const PaintLayer* scrollParent) { | 2186 void CompositedLayerMapping::updateClipParent(const PaintLayer* scrollParent) { |
| 2145 const PaintLayer* clipParent = nullptr; | 2187 const PaintLayer* clipParent = nullptr; |
| 2146 if (!owningLayerClippedByLayerNotAboveCompositedAncestor(scrollParent)) { | 2188 bool haveAncestorClipLayer = false; |
| 2189 bool haveAncestorMaskLayer = false; |
| 2190 owningLayerClippedOrMaskedByLayerNotAboveCompositedAncestor( |
| 2191 scrollParent, haveAncestorClipLayer, haveAncestorMaskLayer); |
| 2192 if (!haveAncestorClipLayer) { |
| 2147 clipParent = m_owningLayer.clipParent(); | 2193 clipParent = m_owningLayer.clipParent(); |
| 2148 if (clipParent) | 2194 if (clipParent) |
| 2149 clipParent = | 2195 clipParent = |
| 2150 clipParent->enclosingLayerWithCompositedLayerMapping(IncludeSelf); | 2196 clipParent->enclosingLayerWithCompositedLayerMapping(IncludeSelf); |
| 2151 } | 2197 } |
| 2152 | 2198 |
| 2153 if (ScrollingCoordinator* scrollingCoordinator = | 2199 if (ScrollingCoordinator* scrollingCoordinator = |
| 2154 scrollingCoordinatorFromLayer(m_owningLayer)) { | 2200 scrollingCoordinatorFromLayer(m_owningLayer)) { |
| 2155 GraphicsLayer* topmostLayer = childForSuperlayers(); | 2201 GraphicsLayer* topmostLayer = childForSuperlayers(); |
| 2156 updateClipParentForGraphicsLayer(m_squashingContainmentLayer.get(), | 2202 updateClipParentForGraphicsLayer(m_squashingContainmentLayer.get(), |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2946 if (graphicsLayerPaintingPhase & GraphicsLayerPaintBackground) | 2992 if (graphicsLayerPaintingPhase & GraphicsLayerPaintBackground) |
| 2947 paintLayerFlags |= PaintLayerPaintingCompositingBackgroundPhase; | 2993 paintLayerFlags |= PaintLayerPaintingCompositingBackgroundPhase; |
| 2948 else | 2994 else |
| 2949 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; | 2995 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; |
| 2950 if (graphicsLayerPaintingPhase & GraphicsLayerPaintForeground) | 2996 if (graphicsLayerPaintingPhase & GraphicsLayerPaintForeground) |
| 2951 paintLayerFlags |= PaintLayerPaintingCompositingForegroundPhase; | 2997 paintLayerFlags |= PaintLayerPaintingCompositingForegroundPhase; |
| 2952 if (graphicsLayerPaintingPhase & GraphicsLayerPaintMask) | 2998 if (graphicsLayerPaintingPhase & GraphicsLayerPaintMask) |
| 2953 paintLayerFlags |= PaintLayerPaintingCompositingMaskPhase; | 2999 paintLayerFlags |= PaintLayerPaintingCompositingMaskPhase; |
| 2954 if (graphicsLayerPaintingPhase & GraphicsLayerPaintChildClippingMask) | 3000 if (graphicsLayerPaintingPhase & GraphicsLayerPaintChildClippingMask) |
| 2955 paintLayerFlags |= PaintLayerPaintingChildClippingMaskPhase; | 3001 paintLayerFlags |= PaintLayerPaintingChildClippingMaskPhase; |
| 3002 if (graphicsLayerPaintingPhase & GraphicsLayerPaintAncestorClippingMask) |
| 3003 paintLayerFlags |= PaintLayerPaintingAncestorClippingMaskPhase; |
| 2956 if (graphicsLayerPaintingPhase & GraphicsLayerPaintOverflowContents) | 3004 if (graphicsLayerPaintingPhase & GraphicsLayerPaintOverflowContents) |
| 2957 paintLayerFlags |= PaintLayerPaintingOverflowContents; | 3005 paintLayerFlags |= PaintLayerPaintingOverflowContents; |
| 2958 if (graphicsLayerPaintingPhase & GraphicsLayerPaintCompositedScroll) | 3006 if (graphicsLayerPaintingPhase & GraphicsLayerPaintCompositedScroll) |
| 2959 paintLayerFlags |= PaintLayerPaintingCompositingScrollingPhase; | 3007 paintLayerFlags |= PaintLayerPaintingCompositingScrollingPhase; |
| 2960 | 3008 |
| 2961 if (graphicsLayer == m_backgroundLayer.get()) | 3009 if (graphicsLayer == m_backgroundLayer.get()) |
| 2962 paintLayerFlags |= PaintLayerPaintingRootBackgroundOnly; | 3010 paintLayerFlags |= PaintLayerPaintingRootBackgroundOnly; |
| 2963 else if (compositor()->fixedRootBackgroundLayer() && | 3011 else if (compositor()->fixedRootBackgroundLayer() && |
| 2964 m_owningLayer.isRootLayer()) | 3012 m_owningLayer.isRootLayer()) |
| 2965 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; | 3013 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; |
| 2966 | 3014 |
| 2967 if (graphicsLayer == m_graphicsLayer.get() || | 3015 if (graphicsLayer == m_graphicsLayer.get() || |
| 2968 graphicsLayer == m_foregroundLayer.get() || | 3016 graphicsLayer == m_foregroundLayer.get() || |
| 2969 graphicsLayer == m_backgroundLayer.get() || | 3017 graphicsLayer == m_backgroundLayer.get() || |
| 2970 graphicsLayer == m_maskLayer.get() || | 3018 graphicsLayer == m_maskLayer.get() || |
| 2971 graphicsLayer == m_childClippingMaskLayer.get() || | 3019 graphicsLayer == m_childClippingMaskLayer.get() || |
| 2972 graphicsLayer == m_scrollingContentsLayer.get()) { | 3020 graphicsLayer == m_scrollingContentsLayer.get() || |
| 3021 graphicsLayer == m_ancestorClippingMaskLayer.get()) { |
| 2973 bool paintRootBackgroundOntoScrollingContentsLayer = | 3022 bool paintRootBackgroundOntoScrollingContentsLayer = |
| 2974 m_backgroundPaintsOntoScrollingContentsLayer; | 3023 m_backgroundPaintsOntoScrollingContentsLayer; |
| 2975 DCHECK(!paintRootBackgroundOntoScrollingContentsLayer || | 3024 DCHECK(!paintRootBackgroundOntoScrollingContentsLayer || |
| 2976 (!m_backgroundLayer && !m_foregroundLayer)); | 3025 (!m_backgroundLayer && !m_foregroundLayer)); |
| 2977 if (paintRootBackgroundOntoScrollingContentsLayer) { | 3026 if (paintRootBackgroundOntoScrollingContentsLayer) { |
| 2978 if (graphicsLayer == m_scrollingContentsLayer.get()) | 3027 if (graphicsLayer == m_scrollingContentsLayer.get()) |
| 2979 paintLayerFlags &= ~PaintLayerPaintingSkipRootBackground; | 3028 paintLayerFlags &= ~PaintLayerPaintingSkipRootBackground; |
| 2980 else | 3029 else |
| 2981 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; | 3030 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; |
| 2982 } | 3031 } |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3217 } else if (graphicsLayer == m_squashingContainmentLayer.get()) { | 3266 } else if (graphicsLayer == m_squashingContainmentLayer.get()) { |
| 3218 name = "Squashing Containment Layer"; | 3267 name = "Squashing Containment Layer"; |
| 3219 } else if (graphicsLayer == m_squashingLayer.get()) { | 3268 } else if (graphicsLayer == m_squashingLayer.get()) { |
| 3220 name = "Squashing Layer (first squashed layer: " + | 3269 name = "Squashing Layer (first squashed layer: " + |
| 3221 (m_squashedLayers.size() > 0 | 3270 (m_squashedLayers.size() > 0 |
| 3222 ? m_squashedLayers[0].paintLayer->debugName() | 3271 ? m_squashedLayers[0].paintLayer->debugName() |
| 3223 : "") + | 3272 : "") + |
| 3224 ")"; | 3273 ")"; |
| 3225 } else if (graphicsLayer == m_ancestorClippingLayer.get()) { | 3274 } else if (graphicsLayer == m_ancestorClippingLayer.get()) { |
| 3226 name = "Ancestor Clipping Layer"; | 3275 name = "Ancestor Clipping Layer"; |
| 3276 } else if (graphicsLayer == m_ancestorClippingMaskLayer.get()) { |
| 3277 name = "Ancestor Clipping Mask Layer"; |
| 3227 } else if (graphicsLayer == m_foregroundLayer.get()) { | 3278 } else if (graphicsLayer == m_foregroundLayer.get()) { |
| 3228 name = m_owningLayer.debugName() + " (foreground) Layer"; | 3279 name = m_owningLayer.debugName() + " (foreground) Layer"; |
| 3229 } else if (graphicsLayer == m_backgroundLayer.get()) { | 3280 } else if (graphicsLayer == m_backgroundLayer.get()) { |
| 3230 name = m_owningLayer.debugName() + " (background) Layer"; | 3281 name = m_owningLayer.debugName() + " (background) Layer"; |
| 3231 } else if (graphicsLayer == m_childContainmentLayer.get()) { | 3282 } else if (graphicsLayer == m_childContainmentLayer.get()) { |
| 3232 name = "Child Containment Layer"; | 3283 name = "Child Containment Layer"; |
| 3233 } else if (graphicsLayer == m_childTransformLayer.get()) { | 3284 } else if (graphicsLayer == m_childTransformLayer.get()) { |
| 3234 name = "Child Transform Layer"; | 3285 name = "Child Transform Layer"; |
| 3235 } else if (graphicsLayer == m_maskLayer.get()) { | 3286 } else if (graphicsLayer == m_maskLayer.get()) { |
| 3236 name = "Mask Layer"; | 3287 name = "Mask Layer"; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3251 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 3302 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 3252 name = "Scrolling Contents Layer"; | 3303 name = "Scrolling Contents Layer"; |
| 3253 } else { | 3304 } else { |
| 3254 ASSERT_NOT_REACHED(); | 3305 ASSERT_NOT_REACHED(); |
| 3255 } | 3306 } |
| 3256 | 3307 |
| 3257 return name; | 3308 return name; |
| 3258 } | 3309 } |
| 3259 | 3310 |
| 3260 } // namespace blink | 3311 } // namespace blink |
| OLD | NEW |