Chromium Code Reviews| 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 negative | |
| 563 // offset that would be covered up by the composited scrolling contents layer | |
| 564 // and scrollbars. | |
| 565 if (updateDecorationLayer( | |
| 566 m_owningLayer.getScrollableArea() && | |
| 567 m_owningLayer.getScrollableArea()->usesCompositedScrolling() && | |
| 568 layoutObject->style()->hasOutline() && | |
| 569 layoutObject->style()->outlineOffset() < 0)) | |
| 570 layerConfigChanged = true; | |
| 571 | |
| 562 if (updateOverflowControlsLayers( | 572 if (updateOverflowControlsLayers( |
| 563 requiresHorizontalScrollbarLayer(), requiresVerticalScrollbarLayer(), | 573 requiresHorizontalScrollbarLayer(), requiresVerticalScrollbarLayer(), |
| 564 requiresScrollCornerLayer(), needsAncestorClip)) | 574 requiresScrollCornerLayer(), needsAncestorClip)) |
| 565 layerConfigChanged = true; | 575 layerConfigChanged = true; |
| 566 | 576 |
| 567 bool hasPerspective = style.hasPerspective(); | 577 bool hasPerspective = style.hasPerspective(); |
| 568 bool needsChildTransformLayer = hasPerspective && layoutObject->isBox(); | 578 bool needsChildTransformLayer = hasPerspective && layoutObject->isBox(); |
| 569 if (updateChildTransformLayer(needsChildTransformLayer)) | 579 if (updateChildTransformLayer(needsChildTransformLayer)) |
| 570 layerConfigChanged = true; | 580 layerConfigChanged = true; |
| 571 | 581 |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 937 clippingBox = clipBox(toLayoutBox(layoutObject())); | 947 clippingBox = clipBox(toLayoutBox(layoutObject())); |
| 938 | 948 |
| 939 updateChildTransformLayerGeometry(); | 949 updateChildTransformLayerGeometry(); |
| 940 updateChildContainmentLayerGeometry(clippingBox, localCompositingBounds); | 950 updateChildContainmentLayerGeometry(clippingBox, localCompositingBounds); |
| 941 | 951 |
| 942 updateMaskLayerGeometry(); | 952 updateMaskLayerGeometry(); |
| 943 updateTransformGeometry(snappedOffsetFromCompositedAncestor, | 953 updateTransformGeometry(snappedOffsetFromCompositedAncestor, |
| 944 relativeCompositingBounds); | 954 relativeCompositingBounds); |
| 945 updateForegroundLayerGeometry(contentsSize, clippingBox); | 955 updateForegroundLayerGeometry(contentsSize, clippingBox); |
| 946 updateBackgroundLayerGeometry(contentsSize); | 956 updateBackgroundLayerGeometry(contentsSize); |
| 957 updateDecorationLayerGeometry(contentsSize); | |
| 947 updateScrollingLayerGeometry(localCompositingBounds); | 958 updateScrollingLayerGeometry(localCompositingBounds); |
| 948 updateChildClippingMaskLayerGeometry(); | 959 updateChildClippingMaskLayerGeometry(); |
| 949 | 960 |
| 950 if (m_owningLayer.getScrollableArea() && | 961 if (m_owningLayer.getScrollableArea() && |
| 951 m_owningLayer.getScrollableArea()->scrollsOverflow()) | 962 m_owningLayer.getScrollableArea()->scrollsOverflow()) |
| 952 m_owningLayer.getScrollableArea()->positionOverflowControls(); | 963 m_owningLayer.getScrollableArea()->positionOverflowControls(); |
| 953 | 964 |
| 954 updateLayerBlendMode(layoutObject()->styleRef()); | 965 updateLayerBlendMode(layoutObject()->styleRef()); |
| 955 updateIsRootForIsolatedGroup(); | 966 updateIsRootForIsolatedGroup(); |
| 956 updateContentsRect(); | 967 updateContentsRect(); |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1364 } | 1375 } |
| 1365 m_backgroundLayer->setPosition(FloatPoint()); | 1376 m_backgroundLayer->setPosition(FloatPoint()); |
| 1366 if (backgroundSize != m_backgroundLayer->size()) { | 1377 if (backgroundSize != m_backgroundLayer->size()) { |
| 1367 m_backgroundLayer->setSize(backgroundSize); | 1378 m_backgroundLayer->setSize(backgroundSize); |
| 1368 m_backgroundLayer->setNeedsDisplay(); | 1379 m_backgroundLayer->setNeedsDisplay(); |
| 1369 } | 1380 } |
| 1370 m_backgroundLayer->setOffsetFromLayoutObject( | 1381 m_backgroundLayer->setOffsetFromLayoutObject( |
| 1371 m_graphicsLayer->offsetFromLayoutObject()); | 1382 m_graphicsLayer->offsetFromLayoutObject()); |
| 1372 } | 1383 } |
| 1373 | 1384 |
| 1385 void CompositedLayerMapping::updateDecorationLayerGeometry( | |
| 1386 const FloatSize& relativeCompositingBoundsSize) { | |
| 1387 if (!m_decorationLayer) | |
| 1388 return; | |
| 1389 FloatSize decorationSize = relativeCompositingBoundsSize; | |
| 1390 m_decorationLayer->setPosition(FloatPoint()); | |
| 1391 if (decorationSize != m_decorationLayer->size()) { | |
| 1392 m_decorationLayer->setSize(decorationSize); | |
| 1393 m_decorationLayer->setNeedsDisplay(); | |
| 1394 } | |
| 1395 m_decorationLayer->setOffsetFromLayoutObject( | |
| 1396 m_graphicsLayer->offsetFromLayoutObject()); | |
| 1397 } | |
| 1398 | |
| 1374 void CompositedLayerMapping::registerScrollingLayers() { | 1399 void CompositedLayerMapping::registerScrollingLayers() { |
| 1375 // Register fixed position layers and their containers with the scrolling | 1400 // Register fixed position layers and their containers with the scrolling |
| 1376 // coordinator. | 1401 // coordinator. |
| 1377 ScrollingCoordinator* scrollingCoordinator = | 1402 ScrollingCoordinator* scrollingCoordinator = |
| 1378 scrollingCoordinatorFromLayer(m_owningLayer); | 1403 scrollingCoordinatorFromLayer(m_owningLayer); |
| 1379 if (!scrollingCoordinator) | 1404 if (!scrollingCoordinator) |
| 1380 return; | 1405 return; |
| 1381 | 1406 |
| 1382 scrollingCoordinator->updateLayerPositionConstraint(&m_owningLayer); | 1407 scrollingCoordinator->updateLayerPositionConstraint(&m_owningLayer); |
| 1383 | 1408 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1431 .containerLayer(); | 1456 .containerLayer(); |
| 1432 updateBottomLayer(m_overflowControlsAncestorClippingLayer.get()); | 1457 updateBottomLayer(m_overflowControlsAncestorClippingLayer.get()); |
| 1433 updateBottomLayer(m_overflowControlsHostLayer.get()); | 1458 updateBottomLayer(m_overflowControlsHostLayer.get()); |
| 1434 if (m_layerForHorizontalScrollbar) | 1459 if (m_layerForHorizontalScrollbar) |
| 1435 m_overflowControlsHostLayer->addChild(m_layerForHorizontalScrollbar.get()); | 1460 m_overflowControlsHostLayer->addChild(m_layerForHorizontalScrollbar.get()); |
| 1436 if (m_layerForVerticalScrollbar) | 1461 if (m_layerForVerticalScrollbar) |
| 1437 m_overflowControlsHostLayer->addChild(m_layerForVerticalScrollbar.get()); | 1462 m_overflowControlsHostLayer->addChild(m_layerForVerticalScrollbar.get()); |
| 1438 if (m_layerForScrollCorner) | 1463 if (m_layerForScrollCorner) |
| 1439 m_overflowControlsHostLayer->addChild(m_layerForScrollCorner.get()); | 1464 m_overflowControlsHostLayer->addChild(m_layerForScrollCorner.get()); |
| 1440 | 1465 |
| 1466 // Now add the DecorationLayer as a subtree to GraphicsLayer | |
| 1467 bottomLayer = m_graphicsLayer.get(); | |
| 1468 updateBottomLayer(m_decorationLayer.get()); | |
| 1469 | |
| 1441 // The squashing containment layer, if it exists, becomes a no-op parent. | 1470 // The squashing containment layer, if it exists, becomes a no-op parent. |
| 1442 if (m_squashingLayer) { | 1471 if (m_squashingLayer) { |
| 1443 ASSERT((m_ancestorClippingLayer && !m_squashingContainmentLayer) || | 1472 ASSERT((m_ancestorClippingLayer && !m_squashingContainmentLayer) || |
| 1444 (!m_ancestorClippingLayer && m_squashingContainmentLayer)); | 1473 (!m_ancestorClippingLayer && m_squashingContainmentLayer)); |
| 1445 | 1474 |
| 1446 if (m_squashingContainmentLayer) { | 1475 if (m_squashingContainmentLayer) { |
| 1447 m_squashingContainmentLayer->removeAllChildren(); | 1476 m_squashingContainmentLayer->removeAllChildren(); |
| 1448 m_squashingContainmentLayer->addChild(m_graphicsLayer.get()); | 1477 m_squashingContainmentLayer->addChild(m_graphicsLayer.get()); |
| 1449 m_squashingContainmentLayer->addChild(m_squashingLayer.get()); | 1478 m_squashingContainmentLayer->addChild(m_squashingLayer.get()); |
| 1450 } else { | 1479 } else { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1563 contentLayer->setBackgroundColor(bgColor.rgb()); | 1592 contentLayer->setBackgroundColor(bgColor.rgb()); |
| 1564 } | 1593 } |
| 1565 } | 1594 } |
| 1566 | 1595 |
| 1567 // FIXME: we could refine this to only allocate backings for one of these | 1596 // FIXME: we could refine this to only allocate backings for one of these |
| 1568 // layers if possible. | 1597 // layers if possible. |
| 1569 if (m_foregroundLayer) | 1598 if (m_foregroundLayer) |
| 1570 m_foregroundLayer->setDrawsContent(hasPaintedContent); | 1599 m_foregroundLayer->setDrawsContent(hasPaintedContent); |
| 1571 | 1600 |
| 1572 if (m_backgroundLayer) | 1601 if (m_backgroundLayer) |
| 1573 m_backgroundLayer->setDrawsContent(hasPaintedContent); | 1602 m_backgroundLayer->setDrawsContent(hasPaintedContent); |
|
flackr
2016/10/25 19:48:10
The background should no longer setDrawsContent(tr
yigu
2016/10/25 20:58:45
TODO added.
| |
| 1574 | 1603 |
| 1604 if (m_decorationLayer) | |
| 1605 m_decorationLayer->setDrawsContent(hasPaintedContent); | |
|
flackr
2016/10/25 19:48:10
We should only be allocating an m_decorationLayer
yigu
2016/10/25 20:58:45
Set to true.
| |
| 1606 | |
| 1575 if (m_maskLayer) | 1607 if (m_maskLayer) |
| 1576 m_maskLayer->setDrawsContent(true); | 1608 m_maskLayer->setDrawsContent(true); |
| 1577 | 1609 |
| 1578 if (m_childClippingMaskLayer) | 1610 if (m_childClippingMaskLayer) |
| 1579 m_childClippingMaskLayer->setDrawsContent(true); | 1611 m_childClippingMaskLayer->setDrawsContent(true); |
| 1580 } | 1612 } |
| 1581 | 1613 |
| 1582 void CompositedLayerMapping::updateChildrenTransform() { | 1614 void CompositedLayerMapping::updateChildrenTransform() { |
| 1583 if (GraphicsLayer* childTransformLayer = this->childTransformLayer()) { | 1615 if (GraphicsLayer* childTransformLayer = this->childTransformLayer()) { |
| 1584 childTransformLayer->setTransform(owningLayer().perspectiveTransform()); | 1616 childTransformLayer->setTransform(owningLayer().perspectiveTransform()); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1764 ApplyToLayersAffectedByPreserve3D = (1 << 0), | 1796 ApplyToLayersAffectedByPreserve3D = (1 << 0), |
| 1765 ApplyToSquashingLayer = (1 << 1), | 1797 ApplyToSquashingLayer = (1 << 1), |
| 1766 ApplyToScrollbarLayers = (1 << 2), | 1798 ApplyToScrollbarLayers = (1 << 2), |
| 1767 ApplyToBackgroundLayer = (1 << 3), | 1799 ApplyToBackgroundLayer = (1 << 3), |
| 1768 ApplyToMaskLayers = (1 << 4), | 1800 ApplyToMaskLayers = (1 << 4), |
| 1769 ApplyToContentLayers = (1 << 5), | 1801 ApplyToContentLayers = (1 << 5), |
| 1770 ApplyToChildContainingLayers = | 1802 ApplyToChildContainingLayers = |
| 1771 (1 << 6), // layers between m_graphicsLayer and children | 1803 (1 << 6), // layers between m_graphicsLayer and children |
| 1772 ApplyToNonScrollingContentLayers = (1 << 7), | 1804 ApplyToNonScrollingContentLayers = (1 << 7), |
| 1773 ApplyToScrollingContentLayers = (1 << 8), | 1805 ApplyToScrollingContentLayers = (1 << 8), |
| 1806 ApplyToDecorationLayer = (1 << 9), | |
| 1774 ApplyToAllGraphicsLayers = | 1807 ApplyToAllGraphicsLayers = |
| 1775 (ApplyToSquashingLayer | ApplyToScrollbarLayers | ApplyToBackgroundLayer | | 1808 (ApplyToSquashingLayer | ApplyToScrollbarLayers | ApplyToBackgroundLayer | |
| 1776 ApplyToMaskLayers | | 1809 ApplyToMaskLayers | |
| 1777 ApplyToLayersAffectedByPreserve3D | | 1810 ApplyToLayersAffectedByPreserve3D | |
| 1778 ApplyToContentLayers | | 1811 ApplyToContentLayers | |
| 1779 ApplyToScrollingContentLayers) | 1812 ApplyToScrollingContentLayers | |
| 1813 ApplyToDecorationLayer) | |
| 1780 }; | 1814 }; |
| 1781 typedef unsigned ApplyToGraphicsLayersMode; | 1815 typedef unsigned ApplyToGraphicsLayersMode; |
| 1782 | 1816 |
| 1783 template <typename Func> | 1817 template <typename Func> |
| 1784 static void ApplyToGraphicsLayers(const CompositedLayerMapping* mapping, | 1818 static void ApplyToGraphicsLayers(const CompositedLayerMapping* mapping, |
| 1785 const Func& f, | 1819 const Func& f, |
| 1786 ApplyToGraphicsLayersMode mode) { | 1820 ApplyToGraphicsLayersMode mode) { |
| 1787 ASSERT(mode); | 1821 ASSERT(mode); |
| 1788 | 1822 |
| 1789 if ((mode & ApplyToLayersAffectedByPreserve3D) && | 1823 if ((mode & ApplyToLayersAffectedByPreserve3D) && |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1832 (mode & ApplyToNonScrollingContentLayers)) && | 1866 (mode & ApplyToNonScrollingContentLayers)) && |
| 1833 mapping->backgroundLayer()) | 1867 mapping->backgroundLayer()) |
| 1834 f(mapping->backgroundLayer()); | 1868 f(mapping->backgroundLayer()); |
| 1835 | 1869 |
| 1836 if ((mode & ApplyToScrollbarLayers) && mapping->layerForHorizontalScrollbar()) | 1870 if ((mode & ApplyToScrollbarLayers) && mapping->layerForHorizontalScrollbar()) |
| 1837 f(mapping->layerForHorizontalScrollbar()); | 1871 f(mapping->layerForHorizontalScrollbar()); |
| 1838 if ((mode & ApplyToScrollbarLayers) && mapping->layerForVerticalScrollbar()) | 1872 if ((mode & ApplyToScrollbarLayers) && mapping->layerForVerticalScrollbar()) |
| 1839 f(mapping->layerForVerticalScrollbar()); | 1873 f(mapping->layerForVerticalScrollbar()); |
| 1840 if ((mode & ApplyToScrollbarLayers) && mapping->layerForScrollCorner()) | 1874 if ((mode & ApplyToScrollbarLayers) && mapping->layerForScrollCorner()) |
| 1841 f(mapping->layerForScrollCorner()); | 1875 f(mapping->layerForScrollCorner()); |
| 1876 | |
| 1877 if (((mode & ApplyToDecorationLayer) || | |
| 1878 (mode & ApplyToNonScrollingContentLayers)) && | |
| 1879 mapping->decorationLayer()) | |
| 1880 f(mapping->decorationLayer()); | |
| 1842 } | 1881 } |
| 1843 | 1882 |
| 1844 struct UpdateRenderingContextFunctor { | 1883 struct UpdateRenderingContextFunctor { |
| 1845 void operator()(GraphicsLayer* layer) const { | 1884 void operator()(GraphicsLayer* layer) const { |
| 1846 layer->setRenderingContext(renderingContext); | 1885 layer->setRenderingContext(renderingContext); |
| 1847 } | 1886 } |
| 1848 int renderingContext; | 1887 int renderingContext; |
| 1849 }; | 1888 }; |
| 1850 | 1889 |
| 1851 void CompositedLayerMapping::updateRenderingContext() { | 1890 void CompositedLayerMapping::updateRenderingContext() { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2010 layerChanged = true; | 2049 layerChanged = true; |
| 2011 } | 2050 } |
| 2012 } | 2051 } |
| 2013 | 2052 |
| 2014 if (layerChanged && !m_owningLayer.layoutObject()->documentBeingDestroyed()) | 2053 if (layerChanged && !m_owningLayer.layoutObject()->documentBeingDestroyed()) |
| 2015 compositor()->rootFixedBackgroundsChanged(); | 2054 compositor()->rootFixedBackgroundsChanged(); |
| 2016 | 2055 |
| 2017 return layerChanged; | 2056 return layerChanged; |
| 2018 } | 2057 } |
| 2019 | 2058 |
| 2059 bool CompositedLayerMapping::updateDecorationLayer(bool needsDecorationLayer) { | |
| 2060 bool layerChanged = false; | |
| 2061 if (needsDecorationLayer) { | |
| 2062 if (!m_decorationLayer) { | |
| 2063 m_decorationLayer = | |
| 2064 createGraphicsLayer(CompositingReasonLayerForDecoration); | |
| 2065 m_decorationLayer->setPaintingPhase(GraphicsLayerPaintDecoration); | |
| 2066 layerChanged = true; | |
| 2067 } | |
| 2068 } else if (m_decorationLayer) { | |
| 2069 m_decorationLayer = nullptr; | |
| 2070 layerChanged = true; | |
| 2071 } | |
| 2072 | |
| 2073 return layerChanged; | |
| 2074 } | |
| 2075 | |
| 2020 bool CompositedLayerMapping::updateMaskLayer(bool needsMaskLayer) { | 2076 bool CompositedLayerMapping::updateMaskLayer(bool needsMaskLayer) { |
| 2021 bool layerChanged = false; | 2077 bool layerChanged = false; |
| 2022 if (needsMaskLayer) { | 2078 if (needsMaskLayer) { |
| 2023 if (!m_maskLayer) { | 2079 if (!m_maskLayer) { |
| 2024 m_maskLayer = createGraphicsLayer(CompositingReasonLayerForMask); | 2080 m_maskLayer = createGraphicsLayer(CompositingReasonLayerForMask); |
| 2025 m_maskLayer->setPaintingPhase(GraphicsLayerPaintMask); | 2081 m_maskLayer->setPaintingPhase(GraphicsLayerPaintMask); |
| 2026 layerChanged = true; | 2082 layerChanged = true; |
| 2027 } | 2083 } |
| 2028 } else if (m_maskLayer) { | 2084 } else if (m_maskLayer) { |
| 2029 m_maskLayer = nullptr; | 2085 m_maskLayer = nullptr; |
| (...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2948 if (graphicsLayerPaintingPhase & GraphicsLayerPaintForeground) | 3004 if (graphicsLayerPaintingPhase & GraphicsLayerPaintForeground) |
| 2949 paintLayerFlags |= PaintLayerPaintingCompositingForegroundPhase; | 3005 paintLayerFlags |= PaintLayerPaintingCompositingForegroundPhase; |
| 2950 if (graphicsLayerPaintingPhase & GraphicsLayerPaintMask) | 3006 if (graphicsLayerPaintingPhase & GraphicsLayerPaintMask) |
| 2951 paintLayerFlags |= PaintLayerPaintingCompositingMaskPhase; | 3007 paintLayerFlags |= PaintLayerPaintingCompositingMaskPhase; |
| 2952 if (graphicsLayerPaintingPhase & GraphicsLayerPaintChildClippingMask) | 3008 if (graphicsLayerPaintingPhase & GraphicsLayerPaintChildClippingMask) |
| 2953 paintLayerFlags |= PaintLayerPaintingChildClippingMaskPhase; | 3009 paintLayerFlags |= PaintLayerPaintingChildClippingMaskPhase; |
| 2954 if (graphicsLayerPaintingPhase & GraphicsLayerPaintOverflowContents) | 3010 if (graphicsLayerPaintingPhase & GraphicsLayerPaintOverflowContents) |
| 2955 paintLayerFlags |= PaintLayerPaintingOverflowContents; | 3011 paintLayerFlags |= PaintLayerPaintingOverflowContents; |
| 2956 if (graphicsLayerPaintingPhase & GraphicsLayerPaintCompositedScroll) | 3012 if (graphicsLayerPaintingPhase & GraphicsLayerPaintCompositedScroll) |
| 2957 paintLayerFlags |= PaintLayerPaintingCompositingScrollingPhase; | 3013 paintLayerFlags |= PaintLayerPaintingCompositingScrollingPhase; |
| 3014 if (graphicsLayerPaintingPhase & GraphicsLayerPaintDecoration) | |
| 3015 paintLayerFlags |= PaintLayerPaintingCompositingDecorationPhase; | |
| 2958 | 3016 |
| 2959 if (graphicsLayer == m_backgroundLayer.get()) | 3017 if (graphicsLayer == m_backgroundLayer.get()) |
| 2960 paintLayerFlags |= PaintLayerPaintingRootBackgroundOnly; | 3018 paintLayerFlags |= PaintLayerPaintingRootBackgroundOnly; |
| 2961 else if (compositor()->fixedRootBackgroundLayer() && | 3019 else if (compositor()->fixedRootBackgroundLayer() && |
| 2962 m_owningLayer.isRootLayer()) | 3020 m_owningLayer.isRootLayer()) |
| 2963 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; | 3021 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; |
| 2964 | 3022 |
| 2965 if (graphicsLayer == m_graphicsLayer.get() || | 3023 if (graphicsLayer == m_graphicsLayer.get() || |
| 2966 graphicsLayer == m_foregroundLayer.get() || | 3024 graphicsLayer == m_foregroundLayer.get() || |
| 2967 graphicsLayer == m_backgroundLayer.get() || | 3025 graphicsLayer == m_backgroundLayer.get() || |
| 2968 graphicsLayer == m_maskLayer.get() || | 3026 graphicsLayer == m_maskLayer.get() || |
| 2969 graphicsLayer == m_childClippingMaskLayer.get() || | 3027 graphicsLayer == m_childClippingMaskLayer.get() || |
| 2970 graphicsLayer == m_scrollingContentsLayer.get()) { | 3028 graphicsLayer == m_scrollingContentsLayer.get() || |
| 3029 graphicsLayer == m_decorationLayer.get()) { | |
| 2971 bool paintRootBackgroundOntoScrollingContentsLayer = | 3030 bool paintRootBackgroundOntoScrollingContentsLayer = |
| 2972 m_backgroundPaintsOntoScrollingContentsLayer; | 3031 m_backgroundPaintsOntoScrollingContentsLayer; |
| 2973 DCHECK(!paintRootBackgroundOntoScrollingContentsLayer || | 3032 DCHECK(!paintRootBackgroundOntoScrollingContentsLayer || |
| 2974 (!m_backgroundLayer && !m_foregroundLayer)); | 3033 (!m_backgroundLayer && !m_foregroundLayer)); |
| 2975 if (paintRootBackgroundOntoScrollingContentsLayer) { | 3034 if (paintRootBackgroundOntoScrollingContentsLayer) { |
| 2976 if (graphicsLayer == m_scrollingContentsLayer.get()) | 3035 if (graphicsLayer == m_scrollingContentsLayer.get()) |
| 2977 paintLayerFlags &= ~PaintLayerPaintingSkipRootBackground; | 3036 paintLayerFlags &= ~PaintLayerPaintingSkipRootBackground; |
| 2978 else | 3037 else |
| 2979 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; | 3038 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; |
| 2980 } | 3039 } |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3241 } else if (graphicsLayer == m_layerForScrollCorner.get()) { | 3300 } else if (graphicsLayer == m_layerForScrollCorner.get()) { |
| 3242 name = "Scroll Corner Layer"; | 3301 name = "Scroll Corner Layer"; |
| 3243 } else if (graphicsLayer == m_overflowControlsHostLayer.get()) { | 3302 } else if (graphicsLayer == m_overflowControlsHostLayer.get()) { |
| 3244 name = "Overflow Controls Host Layer"; | 3303 name = "Overflow Controls Host Layer"; |
| 3245 } else if (graphicsLayer == m_overflowControlsAncestorClippingLayer.get()) { | 3304 } else if (graphicsLayer == m_overflowControlsAncestorClippingLayer.get()) { |
| 3246 name = "Overflow Controls Ancestor Clipping Layer"; | 3305 name = "Overflow Controls Ancestor Clipping Layer"; |
| 3247 } else if (graphicsLayer == m_scrollingLayer.get()) { | 3306 } else if (graphicsLayer == m_scrollingLayer.get()) { |
| 3248 name = "Scrolling Layer"; | 3307 name = "Scrolling Layer"; |
| 3249 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 3308 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 3250 name = "Scrolling Contents Layer"; | 3309 name = "Scrolling Contents Layer"; |
| 3310 } else if (graphicsLayer == m_decorationLayer.get()) { | |
| 3311 name = "Decoration Layer"; | |
| 3251 } else { | 3312 } else { |
| 3252 ASSERT_NOT_REACHED(); | 3313 ASSERT_NOT_REACHED(); |
| 3253 } | 3314 } |
| 3254 | 3315 |
| 3255 return name; | 3316 return name; |
| 3256 } | 3317 } |
| 3257 | 3318 |
| 3258 } // namespace blink | 3319 } // namespace blink |
| OLD | NEW |