Changeset 213429 in webkit
- Timestamp:
- Mar 4, 2017, 1:49:30 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r213424 r213429 1 2017-03-04 Simon Fraser <simon.fraser@apple.com> 2 3 Clarify some terminology in RenderLayerBacking 4 https://bugs.webkit.org/show_bug.cgi?id=169174 5 6 Reviewed by Zalan Bujtas. 7 8 Rename some functions related to directly-composited background images and 9 box decorations for clarify. 10 11 Only behavior change is for canDirectlyCompositeBackgroundBackgroundImage() to check 12 GraphicsLayer::supportsContentsTiling(), which means that RenderLayerBacking::contentChanged() 13 will no longer trigger a updateGeometry() when it gets BackgroundImageChanged on non- 14 CoordinateGraphics platforms. 15 16 * rendering/RenderLayerBacking.cpp: 17 (WebCore::RenderLayerBacking::updateConfiguration): 18 (WebCore::RenderLayerBacking::updateAfterDescendants): 19 (WebCore::RenderLayerBacking::updateDirectlyCompositedBoxDecorations): 20 (WebCore::canDirectlyCompositeBackgroundBackgroundImage): 21 (WebCore::hasPaintedBoxDecorationsOrBackgroundImage): 22 (WebCore::supportsDirectlyCompositedBoxDecorations): 23 (WebCore::RenderLayerBacking::paintsBoxDecorations): 24 (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): 25 (WebCore::RenderLayerBacking::contentChanged): 26 (WebCore::RenderLayerBacking::updateDirectlyCompositedContents): Deleted. 27 (WebCore::canCreateTiledImage): Deleted. 28 (WebCore::hasVisibleBoxDecorationsOrBackgroundImage): Deleted. 29 (WebCore::supportsDirectBoxDecorationsComposition): Deleted. 30 * rendering/RenderLayerBacking.h: 31 1 32 2017-03-04 Alex Christensen <achristensen@webkit.org> 2 33 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r213405 r213429 608 608 } 609 609 } else 610 m_graphicsLayer->setReplicatedByLayer( 0);610 m_graphicsLayer->setReplicatedByLayer(nullptr); 611 611 612 612 if (!m_owningLayer.isRootLayer()) { 613 613 bool isSimpleContainer = isSimpleContainerCompositingLayer(); 614 614 bool didUpdateContentsRect = false; 615 updateDirectlyComposited Contents(isSimpleContainer, didUpdateContentsRect);615 updateDirectlyCompositedBoxDecorations(isSimpleContainer, didUpdateContentsRect); 616 616 } else 617 617 updateRootLayerConfiguration(); … … 1098 1098 // FIXME: this duplicates work we did in updateConfiguration(). 1099 1099 isSimpleContainer = isSimpleContainerCompositingLayer(); 1100 updateDirectlyComposited Contents(isSimpleContainer, didUpdateContentsRect);1100 updateDirectlyCompositedBoxDecorations(isSimpleContainer, didUpdateContentsRect); 1101 1101 if (!didUpdateContentsRect && m_graphicsLayer->usesContentsLayer()) 1102 1102 resetContentsRect(); … … 1182 1182 } 1183 1183 1184 void RenderLayerBacking::updateDirectlyComposited Contents(bool isSimpleContainer, bool& didUpdateContentsRect)1184 void RenderLayerBacking::updateDirectlyCompositedBoxDecorations(bool isSimpleContainer, bool& didUpdateContentsRect) 1185 1185 { 1186 1186 if (!m_owningLayer.hasVisibleContent()) … … 1711 1711 } 1712 1712 1713 static bool canCreateTiledImage(const RenderStyle& style) 1714 { 1713 static bool canDirectlyCompositeBackgroundBackgroundImage(const RenderStyle& style) 1714 { 1715 if (!GraphicsLayer::supportsContentsTiling()) 1716 return false; 1717 1715 1718 auto& fillLayer = style.backgroundLayers(); 1716 1719 if (fillLayer.next()) … … 1740 1743 } 1741 1744 1742 static bool has VisibleBoxDecorationsOrBackgroundImage(const RenderStyle& style)1745 static bool hasPaintedBoxDecorationsOrBackgroundImage(const RenderStyle& style) 1743 1746 { 1744 1747 if (hasVisibleBoxDecorations(style)) … … 1748 1751 return false; 1749 1752 1750 return ! GraphicsLayer::supportsContentsTiling() || !canCreateTiledImage(style);1753 return !canDirectlyCompositeBackgroundBackgroundImage(style); 1751 1754 } 1752 1755 … … 1834 1837 } 1835 1838 1836 static bool supportsDirect BoxDecorationsComposition(const RenderLayerModelObject& renderer)1839 static bool supportsDirectlyCompositedBoxDecorations(const RenderLayerModelObject& renderer) 1837 1840 { 1838 1841 if (!GraphicsLayer::supportsBackgroundColorContent()) … … 1843 1846 return false; 1844 1847 1845 if (has VisibleBoxDecorationsOrBackgroundImage(style))1848 if (hasPaintedBoxDecorationsOrBackgroundImage(style)) 1846 1849 return false; 1847 1850 … … 1866 1869 return false; 1867 1870 1868 return !supportsDirect BoxDecorationsComposition(renderer());1871 return !supportsDirectlyCompositedBoxDecorations(renderer()); 1869 1872 } 1870 1873 … … 1928 1931 // Reject anything that has a border, a border-radius or outline, 1929 1932 // or is not a simple background (no background, or solid color). 1930 if (has VisibleBoxDecorationsOrBackgroundImage(rootObject->style()))1933 if (hasPaintedBoxDecorationsOrBackgroundImage(rootObject->style())) 1931 1934 return false; 1932 1935 … … 1939 1942 return false; 1940 1943 1941 if (has VisibleBoxDecorationsOrBackgroundImage(bodyRenderer->style()))1944 if (hasPaintedBoxDecorationsOrBackgroundImage(bodyRenderer->style())) 1942 1945 return false; 1943 1946 } … … 2051 2054 } 2052 2055 2053 if ((changeType == BackgroundImageChanged) && can CreateTiledImage(renderer().style()))2056 if ((changeType == BackgroundImageChanged) && canDirectlyCompositeBackgroundBackgroundImage(renderer().style())) 2054 2057 updateGeometry(); 2055 2058 -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r213405 r213429 322 322 323 323 Color rendererBackgroundColor() const; 324 325 void updateDirectlyCompositedBoxDecorations(bool isSimpleContainer, bool& didUpdateContentsRect); 324 326 void updateDirectlyCompositedBackgroundColor(bool isSimpleContainer, bool& didUpdateContentsRect); 325 327 void updateDirectlyCompositedBackgroundImage(bool isSimpleContainer, bool& didUpdateContentsRect); 326 void updateDirectlyCompositedContents(bool isSimpleContainer, bool& didUpdateContentsRect);327 328 328 329 void resetContentsRect();
Note:
See TracChangeset
for help on using the changeset viewer.