Changeset 213405 in webkit
- Timestamp:
- Mar 3, 2017, 5:45:42 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r213404 r213405 1 2017-03-03 Simon Fraser <simon.fraser@apple.com> 2 3 Clean up some RenderLayerBacking code 4 https://bugs.webkit.org/show_bug.cgi?id=169160 5 6 Reviewed by Dean Jackson. 7 8 Modern loops in descendantLayerPaintsIntoAncestor(). 9 10 Rename RenderLayerBacking::paintsChildren() to RenderLayerBacking::paintsChildRenderers() to clarify that 11 it refers to renderers, not RenderLayers. 12 13 Rename RenderLayerBacking::paintsNonDirectCompositedBoxDecoration() to RenderLayerBacking::paintsBoxDecorations(). 14 "Paints" already implies non-composited. 15 16 No behavior change. 17 18 * rendering/RenderLayerBacking.cpp: 19 (WebCore::RenderLayerBacking::updateDrawsContent): 20 (WebCore::RenderLayerBacking::paintsBoxDecorations): 21 (WebCore::RenderLayerBacking::paintsChildRenderers): 22 (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): 23 (WebCore::descendantLayerPaintsIntoAncestor): 24 (WebCore::RenderLayerBacking::paintsNonDirectCompositedBoxDecoration): Deleted. 25 (WebCore::RenderLayerBacking::paintsChildren): Deleted. 26 * rendering/RenderLayerBacking.h: 27 1 28 2017-03-03 Simon Fraser <simon.fraser@apple.com> 2 29 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r212776 r213405 1272 1272 m_graphicsLayer->setDrawsContent(hasNonScrollingPaintedContent); 1273 1273 1274 bool hasScrollingPaintedContent = m_owningLayer.hasVisibleContent() && (renderer().hasBackground() || paintsChild ren());1274 bool hasScrollingPaintedContent = m_owningLayer.hasVisibleContent() && (renderer().hasBackground() || paintsChildRenderers()); 1275 1275 m_scrollingContentsLayer->setDrawsContent(hasScrollingPaintedContent); 1276 1276 return; … … 1861 1861 } 1862 1862 1863 bool RenderLayerBacking::paints NonDirectCompositedBoxDecoration() const1863 bool RenderLayerBacking::paintsBoxDecorations() const 1864 1864 { 1865 1865 if (!m_owningLayer.hasVisibleBoxDecorations()) … … 1869 1869 } 1870 1870 1871 bool RenderLayerBacking::paintsChild ren() const1871 bool RenderLayerBacking::paintsChildRenderers() const 1872 1872 { 1873 1873 if (m_owningLayer.hasVisibleContent() && m_owningLayer.hasNonEmptyChildRenderers()) … … 1908 1908 return false; 1909 1909 1910 if (paints NonDirectCompositedBoxDecoration() || paintsChildren())1910 if (paintsBoxDecorations() || paintsChildRenderers()) 1911 1911 return false; 1912 1912 … … 1955 1955 #endif 1956 1956 1957 if (Vector<RenderLayer*>* normalFlowList = parent.normalFlowList()) { 1958 size_t listSize = normalFlowList->size(); 1959 for (size_t i = 0; i < listSize; ++i) { 1960 RenderLayer* curLayer = normalFlowList->at(i); 1961 if (!compositedWithOwnBackingStore(*curLayer) 1962 && (curLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*curLayer))) 1957 if (auto* normalFlowList = parent.normalFlowList()) { 1958 for (auto* childLayer : *normalFlowList) { 1959 if (!compositedWithOwnBackingStore(*childLayer) && (childLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*childLayer))) 1963 1960 return true; 1964 1961 } … … 1970 1967 1971 1968 // Use the m_hasCompositingDescendant bit to optimize? 1972 if (Vector<RenderLayer*>* negZOrderList = parent.negZOrderList()) { 1973 size_t listSize = negZOrderList->size(); 1974 for (size_t i = 0; i < listSize; ++i) { 1975 RenderLayer* curLayer = negZOrderList->at(i); 1976 if (!compositedWithOwnBackingStore(*curLayer) 1977 && (curLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*curLayer))) 1969 if (auto* negZOrderList = parent.negZOrderList()) { 1970 for (auto* childLayer : *negZOrderList) { 1971 if (!compositedWithOwnBackingStore(*childLayer) && (childLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*childLayer))) 1978 1972 return true; 1979 1973 } 1980 1974 } 1981 1975 1982 if (Vector<RenderLayer*>* posZOrderList = parent.posZOrderList()) { 1983 size_t listSize = posZOrderList->size(); 1984 for (size_t i = 0; i < listSize; ++i) { 1985 RenderLayer* curLayer = posZOrderList->at(i); 1986 if (!compositedWithOwnBackingStore(*curLayer) 1987 && (curLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*curLayer))) 1976 if (auto* posZOrderList = parent.posZOrderList()) { 1977 for (auto* childLayer : *posZOrderList) { 1978 if (!compositedWithOwnBackingStore(*childLayer) && (childLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*childLayer))) 1988 1979 return true; 1989 1980 } -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r211662 r213405 310 310 bool isMainFrameRenderViewLayer() const; 311 311 312 bool paints NonDirectCompositedBoxDecoration() const;313 bool paintsChild ren() const;312 bool paintsBoxDecorations() const; 313 bool paintsChildRenderers() const; 314 314 315 315 // Returns true if this compositing layer has no visible content.
Note:
See TracChangeset
for help on using the changeset viewer.