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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
552 | 552 |
553 if (updateClippingLayers(needsAncestorClip, needsDescendantsClippingLayer)) | 553 if (updateClippingLayers(needsAncestorClip, needsDescendantsClippingLayer)) |
554 layerConfigChanged = true; | 554 layerConfigChanged = true; |
555 | 555 |
556 bool scrollingConfigChanged = false; | 556 bool scrollingConfigChanged = false; |
557 if (updateScrollingLayers(m_owningLayer.needsCompositedScrolling())) { | 557 if (updateScrollingLayers(m_owningLayer.needsCompositedScrolling())) { |
558 layerConfigChanged = true; | 558 layerConfigChanged = true; |
559 scrollingConfigChanged = true; | 559 scrollingConfigChanged = true; |
560 } | 560 } |
561 | 561 |
562 // The decoration layer is currently used for painting outline with certain | |
563 // offset that would be covered up by the composited scrolling contents layer | |
564 // and scrollbars. | |
flackr
2016/10/25 21:26:30
Suggested wording:
If the outline needs to draw ov
yigu
2016/10/27 20:21:26
Done.
| |
565 int minBorderWidth = | |
566 std::min(layoutObject->style()->borderTopWidth(), | |
567 std::min(layoutObject->style()->borderLeftWidth(), | |
568 std::min(layoutObject->style()->borderRightWidth(), | |
569 layoutObject->style()->borderBottomWidth()))); | |
570 bool needsDecorationLayer = | |
571 m_owningLayer.getScrollableArea() && | |
572 m_owningLayer.getScrollableArea()->usesCompositedScrolling() && | |
573 layoutObject->style()->hasOutline() && | |
574 layoutObject->style()->outlineOffset() < -minBorderWidth; | |
575 | |
576 if (updateDecorationLayer(needsDecorationLayer)) | |
577 layerConfigChanged = true; | |
578 | |
562 if (updateOverflowControlsLayers( | 579 if (updateOverflowControlsLayers( |
563 requiresHorizontalScrollbarLayer(), requiresVerticalScrollbarLayer(), | 580 requiresHorizontalScrollbarLayer(), requiresVerticalScrollbarLayer(), |
564 requiresScrollCornerLayer(), needsAncestorClip)) | 581 requiresScrollCornerLayer(), needsAncestorClip)) |
565 layerConfigChanged = true; | 582 layerConfigChanged = true; |
566 | 583 |
567 bool hasPerspective = style.hasPerspective(); | 584 bool hasPerspective = style.hasPerspective(); |
568 bool needsChildTransformLayer = hasPerspective && layoutObject->isBox(); | 585 bool needsChildTransformLayer = hasPerspective && layoutObject->isBox(); |
569 if (updateChildTransformLayer(needsChildTransformLayer)) | 586 if (updateChildTransformLayer(needsChildTransformLayer)) |
570 layerConfigChanged = true; | 587 layerConfigChanged = true; |
571 | 588 |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
937 clippingBox = clipBox(toLayoutBox(layoutObject())); | 954 clippingBox = clipBox(toLayoutBox(layoutObject())); |
938 | 955 |
939 updateChildTransformLayerGeometry(); | 956 updateChildTransformLayerGeometry(); |
940 updateChildContainmentLayerGeometry(clippingBox, localCompositingBounds); | 957 updateChildContainmentLayerGeometry(clippingBox, localCompositingBounds); |
941 | 958 |
942 updateMaskLayerGeometry(); | 959 updateMaskLayerGeometry(); |
943 updateTransformGeometry(snappedOffsetFromCompositedAncestor, | 960 updateTransformGeometry(snappedOffsetFromCompositedAncestor, |
944 relativeCompositingBounds); | 961 relativeCompositingBounds); |
945 updateForegroundLayerGeometry(contentsSize, clippingBox); | 962 updateForegroundLayerGeometry(contentsSize, clippingBox); |
946 updateBackgroundLayerGeometry(contentsSize); | 963 updateBackgroundLayerGeometry(contentsSize); |
964 // TODO(yigu): Currently the decoration layer uses the same contentSize | |
965 // as background layer and foreground layer. There are scenarios that | |
966 // the sizes could be different. | |
967 // The actual size of the decoration layer should be calculated separately. | |
flackr
2016/10/25 21:26:30
nit: The size of the background layer should be di
yigu
2016/10/27 20:21:26
Added.
| |
968 updateDecorationLayerGeometry(contentsSize); | |
947 updateScrollingLayerGeometry(localCompositingBounds); | 969 updateScrollingLayerGeometry(localCompositingBounds); |
948 updateChildClippingMaskLayerGeometry(); | 970 updateChildClippingMaskLayerGeometry(); |
949 | 971 |
950 if (m_owningLayer.getScrollableArea() && | 972 if (m_owningLayer.getScrollableArea() && |
951 m_owningLayer.getScrollableArea()->scrollsOverflow()) | 973 m_owningLayer.getScrollableArea()->scrollsOverflow()) |
952 m_owningLayer.getScrollableArea()->positionOverflowControls(); | 974 m_owningLayer.getScrollableArea()->positionOverflowControls(); |
953 | 975 |
954 updateLayerBlendMode(layoutObject()->styleRef()); | 976 updateLayerBlendMode(layoutObject()->styleRef()); |
955 updateIsRootForIsolatedGroup(); | 977 updateIsRootForIsolatedGroup(); |
956 updateContentsRect(); | 978 updateContentsRect(); |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1364 } | 1386 } |
1365 m_backgroundLayer->setPosition(FloatPoint()); | 1387 m_backgroundLayer->setPosition(FloatPoint()); |
1366 if (backgroundSize != m_backgroundLayer->size()) { | 1388 if (backgroundSize != m_backgroundLayer->size()) { |
1367 m_backgroundLayer->setSize(backgroundSize); | 1389 m_backgroundLayer->setSize(backgroundSize); |
1368 m_backgroundLayer->setNeedsDisplay(); | 1390 m_backgroundLayer->setNeedsDisplay(); |
1369 } | 1391 } |
1370 m_backgroundLayer->setOffsetFromLayoutObject( | 1392 m_backgroundLayer->setOffsetFromLayoutObject( |
1371 m_graphicsLayer->offsetFromLayoutObject()); | 1393 m_graphicsLayer->offsetFromLayoutObject()); |
1372 } | 1394 } |
1373 | 1395 |
1396 void CompositedLayerMapping::updateDecorationLayerGeometry( | |
1397 const FloatSize& relativeCompositingBoundsSize) { | |
1398 if (!m_decorationLayer) | |
1399 return; | |
1400 FloatSize decorationSize = relativeCompositingBoundsSize; | |
1401 m_decorationLayer->setPosition(FloatPoint()); | |
1402 if (decorationSize != m_decorationLayer->size()) { | |
1403 m_decorationLayer->setSize(decorationSize); | |
1404 m_decorationLayer->setNeedsDisplay(); | |
1405 } | |
1406 m_decorationLayer->setOffsetFromLayoutObject( | |
1407 m_graphicsLayer->offsetFromLayoutObject()); | |
1408 } | |
1409 | |
1374 void CompositedLayerMapping::registerScrollingLayers() { | 1410 void CompositedLayerMapping::registerScrollingLayers() { |
1375 // Register fixed position layers and their containers with the scrolling | 1411 // Register fixed position layers and their containers with the scrolling |
1376 // coordinator. | 1412 // coordinator. |
1377 ScrollingCoordinator* scrollingCoordinator = | 1413 ScrollingCoordinator* scrollingCoordinator = |
1378 scrollingCoordinatorFromLayer(m_owningLayer); | 1414 scrollingCoordinatorFromLayer(m_owningLayer); |
1379 if (!scrollingCoordinator) | 1415 if (!scrollingCoordinator) |
1380 return; | 1416 return; |
1381 | 1417 |
1382 scrollingCoordinator->updateLayerPositionConstraint(&m_owningLayer); | 1418 scrollingCoordinator->updateLayerPositionConstraint(&m_owningLayer); |
1383 | 1419 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1431 .containerLayer(); | 1467 .containerLayer(); |
1432 updateBottomLayer(m_overflowControlsAncestorClippingLayer.get()); | 1468 updateBottomLayer(m_overflowControlsAncestorClippingLayer.get()); |
1433 updateBottomLayer(m_overflowControlsHostLayer.get()); | 1469 updateBottomLayer(m_overflowControlsHostLayer.get()); |
1434 if (m_layerForHorizontalScrollbar) | 1470 if (m_layerForHorizontalScrollbar) |
1435 m_overflowControlsHostLayer->addChild(m_layerForHorizontalScrollbar.get()); | 1471 m_overflowControlsHostLayer->addChild(m_layerForHorizontalScrollbar.get()); |
1436 if (m_layerForVerticalScrollbar) | 1472 if (m_layerForVerticalScrollbar) |
1437 m_overflowControlsHostLayer->addChild(m_layerForVerticalScrollbar.get()); | 1473 m_overflowControlsHostLayer->addChild(m_layerForVerticalScrollbar.get()); |
1438 if (m_layerForScrollCorner) | 1474 if (m_layerForScrollCorner) |
1439 m_overflowControlsHostLayer->addChild(m_layerForScrollCorner.get()); | 1475 m_overflowControlsHostLayer->addChild(m_layerForScrollCorner.get()); |
1440 | 1476 |
1477 // Now add the DecorationLayer as a subtree to GraphicsLayer | |
1478 bottomLayer = m_graphicsLayer.get(); | |
1479 updateBottomLayer(m_decorationLayer.get()); | |
1480 | |
1441 // The squashing containment layer, if it exists, becomes a no-op parent. | 1481 // The squashing containment layer, if it exists, becomes a no-op parent. |
1442 if (m_squashingLayer) { | 1482 if (m_squashingLayer) { |
1443 ASSERT((m_ancestorClippingLayer && !m_squashingContainmentLayer) || | 1483 ASSERT((m_ancestorClippingLayer && !m_squashingContainmentLayer) || |
1444 (!m_ancestorClippingLayer && m_squashingContainmentLayer)); | 1484 (!m_ancestorClippingLayer && m_squashingContainmentLayer)); |
1445 | 1485 |
1446 if (m_squashingContainmentLayer) { | 1486 if (m_squashingContainmentLayer) { |
1447 m_squashingContainmentLayer->removeAllChildren(); | 1487 m_squashingContainmentLayer->removeAllChildren(); |
1448 m_squashingContainmentLayer->addChild(m_graphicsLayer.get()); | 1488 m_squashingContainmentLayer->addChild(m_graphicsLayer.get()); |
1449 m_squashingContainmentLayer->addChild(m_squashingLayer.get()); | 1489 m_squashingContainmentLayer->addChild(m_squashingLayer.get()); |
1450 } else { | 1490 } else { |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1562 } | 1602 } |
1563 contentLayer->setBackgroundColor(bgColor.rgb()); | 1603 contentLayer->setBackgroundColor(bgColor.rgb()); |
1564 } | 1604 } |
1565 } | 1605 } |
1566 | 1606 |
1567 // FIXME: we could refine this to only allocate backings for one of these | 1607 // FIXME: we could refine this to only allocate backings for one of these |
1568 // layers if possible. | 1608 // layers if possible. |
1569 if (m_foregroundLayer) | 1609 if (m_foregroundLayer) |
1570 m_foregroundLayer->setDrawsContent(hasPaintedContent); | 1610 m_foregroundLayer->setDrawsContent(hasPaintedContent); |
1571 | 1611 |
1612 // TODO(yigu): The background should no longer setDrawsContent(true) if we | |
1613 // only have an outline (i.e. if there is nothing actually drawn into the | |
flackr
2016/10/25 21:26:30
nit: "if we only have an outline and we're drawing
yigu
2016/10/27 20:21:26
Added.
| |
1614 // background anymore.) | |
1615 // "hasPaintedContent" should be calculated in a way that does not take the | |
1616 // outline into consideration. | |
1572 if (m_backgroundLayer) | 1617 if (m_backgroundLayer) |
1573 m_backgroundLayer->setDrawsContent(hasPaintedContent); | 1618 m_backgroundLayer->setDrawsContent(hasPaintedContent); |
1574 | 1619 |
1620 if (m_decorationLayer) | |
1621 m_decorationLayer->setDrawsContent(true); | |
1622 | |
1575 if (m_maskLayer) | 1623 if (m_maskLayer) |
1576 m_maskLayer->setDrawsContent(true); | 1624 m_maskLayer->setDrawsContent(true); |
1577 | 1625 |
1578 if (m_childClippingMaskLayer) | 1626 if (m_childClippingMaskLayer) |
1579 m_childClippingMaskLayer->setDrawsContent(true); | 1627 m_childClippingMaskLayer->setDrawsContent(true); |
1580 } | 1628 } |
1581 | 1629 |
1582 void CompositedLayerMapping::updateChildrenTransform() { | 1630 void CompositedLayerMapping::updateChildrenTransform() { |
1583 if (GraphicsLayer* childTransformLayer = this->childTransformLayer()) { | 1631 if (GraphicsLayer* childTransformLayer = this->childTransformLayer()) { |
1584 childTransformLayer->setTransform(owningLayer().perspectiveTransform()); | 1632 childTransformLayer->setTransform(owningLayer().perspectiveTransform()); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1764 ApplyToLayersAffectedByPreserve3D = (1 << 0), | 1812 ApplyToLayersAffectedByPreserve3D = (1 << 0), |
1765 ApplyToSquashingLayer = (1 << 1), | 1813 ApplyToSquashingLayer = (1 << 1), |
1766 ApplyToScrollbarLayers = (1 << 2), | 1814 ApplyToScrollbarLayers = (1 << 2), |
1767 ApplyToBackgroundLayer = (1 << 3), | 1815 ApplyToBackgroundLayer = (1 << 3), |
1768 ApplyToMaskLayers = (1 << 4), | 1816 ApplyToMaskLayers = (1 << 4), |
1769 ApplyToContentLayers = (1 << 5), | 1817 ApplyToContentLayers = (1 << 5), |
1770 ApplyToChildContainingLayers = | 1818 ApplyToChildContainingLayers = |
1771 (1 << 6), // layers between m_graphicsLayer and children | 1819 (1 << 6), // layers between m_graphicsLayer and children |
1772 ApplyToNonScrollingContentLayers = (1 << 7), | 1820 ApplyToNonScrollingContentLayers = (1 << 7), |
1773 ApplyToScrollingContentLayers = (1 << 8), | 1821 ApplyToScrollingContentLayers = (1 << 8), |
1822 ApplyToDecorationLayer = (1 << 9), | |
1774 ApplyToAllGraphicsLayers = | 1823 ApplyToAllGraphicsLayers = |
1775 (ApplyToSquashingLayer | ApplyToScrollbarLayers | ApplyToBackgroundLayer | | 1824 (ApplyToSquashingLayer | ApplyToScrollbarLayers | ApplyToBackgroundLayer | |
1776 ApplyToMaskLayers | | 1825 ApplyToMaskLayers | |
1777 ApplyToLayersAffectedByPreserve3D | | 1826 ApplyToLayersAffectedByPreserve3D | |
1778 ApplyToContentLayers | | 1827 ApplyToContentLayers | |
1779 ApplyToScrollingContentLayers) | 1828 ApplyToScrollingContentLayers | |
1829 ApplyToDecorationLayer) | |
1780 }; | 1830 }; |
1781 typedef unsigned ApplyToGraphicsLayersMode; | 1831 typedef unsigned ApplyToGraphicsLayersMode; |
1782 | 1832 |
1783 template <typename Func> | 1833 template <typename Func> |
1784 static void ApplyToGraphicsLayers(const CompositedLayerMapping* mapping, | 1834 static void ApplyToGraphicsLayers(const CompositedLayerMapping* mapping, |
1785 const Func& f, | 1835 const Func& f, |
1786 ApplyToGraphicsLayersMode mode) { | 1836 ApplyToGraphicsLayersMode mode) { |
1787 ASSERT(mode); | 1837 ASSERT(mode); |
1788 | 1838 |
1789 if ((mode & ApplyToLayersAffectedByPreserve3D) && | 1839 if ((mode & ApplyToLayersAffectedByPreserve3D) && |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1832 (mode & ApplyToNonScrollingContentLayers)) && | 1882 (mode & ApplyToNonScrollingContentLayers)) && |
1833 mapping->backgroundLayer()) | 1883 mapping->backgroundLayer()) |
1834 f(mapping->backgroundLayer()); | 1884 f(mapping->backgroundLayer()); |
1835 | 1885 |
1836 if ((mode & ApplyToScrollbarLayers) && mapping->layerForHorizontalScrollbar()) | 1886 if ((mode & ApplyToScrollbarLayers) && mapping->layerForHorizontalScrollbar()) |
1837 f(mapping->layerForHorizontalScrollbar()); | 1887 f(mapping->layerForHorizontalScrollbar()); |
1838 if ((mode & ApplyToScrollbarLayers) && mapping->layerForVerticalScrollbar()) | 1888 if ((mode & ApplyToScrollbarLayers) && mapping->layerForVerticalScrollbar()) |
1839 f(mapping->layerForVerticalScrollbar()); | 1889 f(mapping->layerForVerticalScrollbar()); |
1840 if ((mode & ApplyToScrollbarLayers) && mapping->layerForScrollCorner()) | 1890 if ((mode & ApplyToScrollbarLayers) && mapping->layerForScrollCorner()) |
1841 f(mapping->layerForScrollCorner()); | 1891 f(mapping->layerForScrollCorner()); |
1892 | |
1893 if (((mode & ApplyToDecorationLayer) || | |
1894 (mode & ApplyToNonScrollingContentLayers)) && | |
1895 mapping->decorationLayer()) | |
1896 f(mapping->decorationLayer()); | |
1842 } | 1897 } |
1843 | 1898 |
1844 struct UpdateRenderingContextFunctor { | 1899 struct UpdateRenderingContextFunctor { |
1845 void operator()(GraphicsLayer* layer) const { | 1900 void operator()(GraphicsLayer* layer) const { |
1846 layer->setRenderingContext(renderingContext); | 1901 layer->setRenderingContext(renderingContext); |
1847 } | 1902 } |
1848 int renderingContext; | 1903 int renderingContext; |
1849 }; | 1904 }; |
1850 | 1905 |
1851 void CompositedLayerMapping::updateRenderingContext() { | 1906 void CompositedLayerMapping::updateRenderingContext() { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1993 return layerChanged; | 2048 return layerChanged; |
1994 } | 2049 } |
1995 | 2050 |
1996 bool CompositedLayerMapping::updateBackgroundLayer(bool needsBackgroundLayer) { | 2051 bool CompositedLayerMapping::updateBackgroundLayer(bool needsBackgroundLayer) { |
1997 bool layerChanged = false; | 2052 bool layerChanged = false; |
1998 if (needsBackgroundLayer) { | 2053 if (needsBackgroundLayer) { |
1999 if (!m_backgroundLayer) { | 2054 if (!m_backgroundLayer) { |
2000 m_backgroundLayer = | 2055 m_backgroundLayer = |
2001 createGraphicsLayer(CompositingReasonLayerForBackground); | 2056 createGraphicsLayer(CompositingReasonLayerForBackground); |
2002 m_backgroundLayer->setTransformOrigin(FloatPoint3D()); | 2057 m_backgroundLayer->setTransformOrigin(FloatPoint3D()); |
2003 m_backgroundLayer->setPaintingPhase(GraphicsLayerPaintBackground); | 2058 m_backgroundLayer->setPaintingPhase(GraphicsLayerPaintBackground); |
flackr
2016/10/25 21:26:30
I think this function needs to know if we have a d
yigu
2016/10/27 20:21:26
Fix it by adding phase |= GraphicsLayerPaintDecora
| |
2004 layerChanged = true; | 2059 layerChanged = true; |
2005 } | 2060 } |
2006 } else { | 2061 } else { |
2007 if (m_backgroundLayer) { | 2062 if (m_backgroundLayer) { |
2008 m_backgroundLayer->removeFromParent(); | 2063 m_backgroundLayer->removeFromParent(); |
2009 m_backgroundLayer = nullptr; | 2064 m_backgroundLayer = nullptr; |
2010 layerChanged = true; | 2065 layerChanged = true; |
2011 } | 2066 } |
2012 } | 2067 } |
2013 | 2068 |
2014 if (layerChanged && !m_owningLayer.layoutObject()->documentBeingDestroyed()) | 2069 if (layerChanged && !m_owningLayer.layoutObject()->documentBeingDestroyed()) |
2015 compositor()->rootFixedBackgroundsChanged(); | 2070 compositor()->rootFixedBackgroundsChanged(); |
2016 | 2071 |
2017 return layerChanged; | 2072 return layerChanged; |
2018 } | 2073 } |
2019 | 2074 |
2075 bool CompositedLayerMapping::updateDecorationLayer(bool needsDecorationLayer) { | |
2076 bool layerChanged = false; | |
2077 if (needsDecorationLayer) { | |
2078 if (!m_decorationLayer) { | |
2079 m_decorationLayer = | |
2080 createGraphicsLayer(CompositingReasonLayerForDecoration); | |
2081 m_decorationLayer->setPaintingPhase(GraphicsLayerPaintDecoration); | |
2082 layerChanged = true; | |
2083 } | |
2084 } else if (m_decorationLayer) { | |
2085 m_decorationLayer = nullptr; | |
2086 layerChanged = true; | |
2087 } | |
2088 | |
2089 return layerChanged; | |
2090 } | |
2091 | |
2020 bool CompositedLayerMapping::updateMaskLayer(bool needsMaskLayer) { | 2092 bool CompositedLayerMapping::updateMaskLayer(bool needsMaskLayer) { |
2021 bool layerChanged = false; | 2093 bool layerChanged = false; |
2022 if (needsMaskLayer) { | 2094 if (needsMaskLayer) { |
2023 if (!m_maskLayer) { | 2095 if (!m_maskLayer) { |
2024 m_maskLayer = createGraphicsLayer(CompositingReasonLayerForMask); | 2096 m_maskLayer = createGraphicsLayer(CompositingReasonLayerForMask); |
2025 m_maskLayer->setPaintingPhase(GraphicsLayerPaintMask); | 2097 m_maskLayer->setPaintingPhase(GraphicsLayerPaintMask); |
2026 layerChanged = true; | 2098 layerChanged = true; |
2027 } | 2099 } |
2028 } else if (m_maskLayer) { | 2100 } else if (m_maskLayer) { |
2029 m_maskLayer = nullptr; | 2101 m_maskLayer = nullptr; |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2948 if (graphicsLayerPaintingPhase & GraphicsLayerPaintForeground) | 3020 if (graphicsLayerPaintingPhase & GraphicsLayerPaintForeground) |
2949 paintLayerFlags |= PaintLayerPaintingCompositingForegroundPhase; | 3021 paintLayerFlags |= PaintLayerPaintingCompositingForegroundPhase; |
2950 if (graphicsLayerPaintingPhase & GraphicsLayerPaintMask) | 3022 if (graphicsLayerPaintingPhase & GraphicsLayerPaintMask) |
2951 paintLayerFlags |= PaintLayerPaintingCompositingMaskPhase; | 3023 paintLayerFlags |= PaintLayerPaintingCompositingMaskPhase; |
2952 if (graphicsLayerPaintingPhase & GraphicsLayerPaintChildClippingMask) | 3024 if (graphicsLayerPaintingPhase & GraphicsLayerPaintChildClippingMask) |
2953 paintLayerFlags |= PaintLayerPaintingChildClippingMaskPhase; | 3025 paintLayerFlags |= PaintLayerPaintingChildClippingMaskPhase; |
2954 if (graphicsLayerPaintingPhase & GraphicsLayerPaintOverflowContents) | 3026 if (graphicsLayerPaintingPhase & GraphicsLayerPaintOverflowContents) |
2955 paintLayerFlags |= PaintLayerPaintingOverflowContents; | 3027 paintLayerFlags |= PaintLayerPaintingOverflowContents; |
2956 if (graphicsLayerPaintingPhase & GraphicsLayerPaintCompositedScroll) | 3028 if (graphicsLayerPaintingPhase & GraphicsLayerPaintCompositedScroll) |
2957 paintLayerFlags |= PaintLayerPaintingCompositingScrollingPhase; | 3029 paintLayerFlags |= PaintLayerPaintingCompositingScrollingPhase; |
3030 if (graphicsLayerPaintingPhase & GraphicsLayerPaintDecoration) | |
3031 paintLayerFlags |= PaintLayerPaintingCompositingDecorationPhase; | |
2958 | 3032 |
2959 if (graphicsLayer == m_backgroundLayer.get()) | 3033 if (graphicsLayer == m_backgroundLayer.get()) |
2960 paintLayerFlags |= PaintLayerPaintingRootBackgroundOnly; | 3034 paintLayerFlags |= PaintLayerPaintingRootBackgroundOnly; |
2961 else if (compositor()->fixedRootBackgroundLayer() && | 3035 else if (compositor()->fixedRootBackgroundLayer() && |
2962 m_owningLayer.isRootLayer()) | 3036 m_owningLayer.isRootLayer()) |
2963 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; | 3037 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; |
2964 | 3038 |
2965 if (graphicsLayer == m_graphicsLayer.get() || | 3039 if (graphicsLayer == m_graphicsLayer.get() || |
2966 graphicsLayer == m_foregroundLayer.get() || | 3040 graphicsLayer == m_foregroundLayer.get() || |
2967 graphicsLayer == m_backgroundLayer.get() || | 3041 graphicsLayer == m_backgroundLayer.get() || |
2968 graphicsLayer == m_maskLayer.get() || | 3042 graphicsLayer == m_maskLayer.get() || |
2969 graphicsLayer == m_childClippingMaskLayer.get() || | 3043 graphicsLayer == m_childClippingMaskLayer.get() || |
2970 graphicsLayer == m_scrollingContentsLayer.get()) { | 3044 graphicsLayer == m_scrollingContentsLayer.get() || |
3045 graphicsLayer == m_decorationLayer.get()) { | |
2971 bool paintRootBackgroundOntoScrollingContentsLayer = | 3046 bool paintRootBackgroundOntoScrollingContentsLayer = |
2972 m_backgroundPaintsOntoScrollingContentsLayer; | 3047 m_backgroundPaintsOntoScrollingContentsLayer; |
2973 DCHECK(!paintRootBackgroundOntoScrollingContentsLayer || | 3048 DCHECK(!paintRootBackgroundOntoScrollingContentsLayer || |
2974 (!m_backgroundLayer && !m_foregroundLayer)); | 3049 (!m_backgroundLayer && !m_foregroundLayer)); |
2975 if (paintRootBackgroundOntoScrollingContentsLayer) { | 3050 if (paintRootBackgroundOntoScrollingContentsLayer) { |
2976 if (graphicsLayer == m_scrollingContentsLayer.get()) | 3051 if (graphicsLayer == m_scrollingContentsLayer.get()) |
2977 paintLayerFlags &= ~PaintLayerPaintingSkipRootBackground; | 3052 paintLayerFlags &= ~PaintLayerPaintingSkipRootBackground; |
2978 else | 3053 else |
2979 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; | 3054 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; |
2980 } | 3055 } |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3241 } else if (graphicsLayer == m_layerForScrollCorner.get()) { | 3316 } else if (graphicsLayer == m_layerForScrollCorner.get()) { |
3242 name = "Scroll Corner Layer"; | 3317 name = "Scroll Corner Layer"; |
3243 } else if (graphicsLayer == m_overflowControlsHostLayer.get()) { | 3318 } else if (graphicsLayer == m_overflowControlsHostLayer.get()) { |
3244 name = "Overflow Controls Host Layer"; | 3319 name = "Overflow Controls Host Layer"; |
3245 } else if (graphicsLayer == m_overflowControlsAncestorClippingLayer.get()) { | 3320 } else if (graphicsLayer == m_overflowControlsAncestorClippingLayer.get()) { |
3246 name = "Overflow Controls Ancestor Clipping Layer"; | 3321 name = "Overflow Controls Ancestor Clipping Layer"; |
3247 } else if (graphicsLayer == m_scrollingLayer.get()) { | 3322 } else if (graphicsLayer == m_scrollingLayer.get()) { |
3248 name = "Scrolling Layer"; | 3323 name = "Scrolling Layer"; |
3249 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 3324 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
3250 name = "Scrolling Contents Layer"; | 3325 name = "Scrolling Contents Layer"; |
3326 } else if (graphicsLayer == m_decorationLayer.get()) { | |
3327 name = "Decoration Layer"; | |
3251 } else { | 3328 } else { |
3252 ASSERT_NOT_REACHED(); | 3329 ASSERT_NOT_REACHED(); |
3253 } | 3330 } |
3254 | 3331 |
3255 return name; | 3332 return name; |
3256 } | 3333 } |
3257 | 3334 |
3258 } // namespace blink | 3335 } // namespace blink |
OLD | NEW |