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