Changeset 169053 in webkit
- Timestamp:
- May 19, 2014 11:33:26 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r169050 r169053 1 2014-05-19 Simon Fraser <simon.fraser@apple.com> 2 3 Images missing sometimes with composited clipping layers 4 https://bugs.webkit.org/show_bug.cgi?id=133065 5 <rdar://problem/15224559> 6 7 Reviewed by Beth Dakin. 8 9 * compositing/backing/solid-color-with-paints-into-ancestor-expected.html: Added. 10 * compositing/backing/solid-color-with-paints-into-ancestor.html: Added. 11 1 12 2014-05-19 Jono Wells <jonowells@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r169048 r169053 1 2014-05-19 Simon Fraser <simon.fraser@apple.com> 2 3 Images missing sometimes with composited clipping layers 4 https://bugs.webkit.org/show_bug.cgi?id=133065 5 <rdar://problem/15224559> 6 7 Reviewed by Beth Dakin. 8 9 When support for solid colors on layers was added, a layer was considered a candidate 10 for the solid color optimization without regard to whether it had descendent layers 11 with "paintsIntoCompositedAncestor" requirements. 12 13 Fix hasVisibleNonCompositingDescendantLayers(), renaming it to isPaintDestinationForDescendentLayers() 14 and having it take into account whether descendent layers need to paint into an 15 ancestor. 16 17 Also, this test has to happen after those descendent layers have had their 18 compositing state updated, so move the isSimpleContainerCompositingLayer() to 19 a new updateAfterDescendents() function which is called from the various 20 places we do compositing-udpate-tree-walks. 21 22 Test: compositing/backing/solid-color-with-paints-into-ancestor.html 23 24 * rendering/RenderLayerBacking.cpp: 25 (WebCore::RenderLayerBacking::updateGeometry): 26 (WebCore::RenderLayerBacking::updateAfterDescendents): 27 (WebCore::RenderLayerBacking::paintsChildren): 28 (WebCore::compositedWithOwnBackingStore): 29 (WebCore::descendentLayerPaintsIntoAncestor): 30 (WebCore::RenderLayerBacking::isPaintDestinationForDescendentLayers): 31 (WebCore::hasVisibleNonCompositingDescendant): Deleted. 32 (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers): Deleted. 33 * rendering/RenderLayerBacking.h: 34 * rendering/RenderLayerCompositor.cpp: 35 (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): 36 (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): 37 (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): 38 1 39 2014-05-19 Zalan Bujtas <zalan@apple.com> 2 40 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r169046 r169053 671 671 #endif 672 672 673 bool isSimpleContainer = isSimpleContainerCompositingLayer();674 675 673 m_owningLayer.updateDescendantDependentFlags(); 676 677 // m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer and its non-compositing678 // descendants. So, the visibility flag for m_graphicsLayer should be true if there are any679 // non-compositing visible layers.680 m_graphicsLayer->setContentsVisible(m_owningLayer.hasVisibleContent() || hasVisibleNonCompositingDescendantLayers());681 674 682 675 // FIXME: reflections should force transform-style to be flat in the style: https://bugs.webkit.org/show_bug.cgi?id=106959 … … 973 966 setRequiresOwnBackingStore(compositor().requiresOwnBackingStore(m_owningLayer, compAncestor, enclosingRelativeCompositingBounds, ancestorCompositingBounds)); 974 967 968 updateAfterWidgetResize(); 969 970 compositor().updateScrollCoordinatedStatus(m_owningLayer); 971 } 972 973 void RenderLayerBacking::updateAfterDescendents() 974 { 975 975 bool didUpdateContentsRect = false; 976 bool isSimpleContainer = isSimpleContainerCompositingLayer(); 976 977 updateDirectlyCompositedContents(isSimpleContainer, didUpdateContentsRect); 977 978 if (!didUpdateContentsRect && m_graphicsLayer->usesContentsLayer()) … … 979 980 980 981 updateDrawsContent(isSimpleContainer); 981 updateAfterWidgetResize(); 982 983 compositor().updateScrollCoordinatedStatus(m_owningLayer); 982 983 m_graphicsLayer->setContentsVisible(m_owningLayer.hasVisibleContent() || isPaintDestinationForDescendentLayers()); 984 984 } 985 985 … … 1681 1681 return true; 1682 1682 1683 if ( hasVisibleNonCompositingDescendantLayers())1683 if (isPaintDestinationForDescendentLayers()) 1684 1684 return true; 1685 1685 … … 1745 1745 } 1746 1746 1747 static bool hasVisibleNonCompositingDescendant(RenderLayer& parent) 1747 static bool compositedWithOwnBackingStore(const RenderLayer* layer) 1748 { 1749 return layer->isComposited() && !layer->backing()->paintsIntoCompositedAncestor(); 1750 } 1751 1752 static bool descendentLayerPaintsIntoAncestor(RenderLayer& parent) 1748 1753 { 1749 1754 // FIXME: We shouldn't be called with a stale z-order lists. See bug 85512. … … 1758 1763 for (size_t i = 0; i < listSize; ++i) { 1759 1764 RenderLayer* curLayer = normalFlowList->at(i); 1760 if (!c urLayer->isComposited()1761 && (curLayer->hasVisibleContent() || hasVisibleNonCompositingDescendant(*curLayer)))1765 if (!compositedWithOwnBackingStore(curLayer) 1766 && (curLayer->hasVisibleContent() || descendentLayerPaintsIntoAncestor(*curLayer))) 1762 1767 return true; 1763 1768 } … … 1773 1778 for (size_t i = 0; i < listSize; ++i) { 1774 1779 RenderLayer* curLayer = negZOrderList->at(i); 1775 if (!c urLayer->isComposited()1776 && (curLayer->hasVisibleContent() || hasVisibleNonCompositingDescendant(*curLayer)))1780 if (!compositedWithOwnBackingStore(curLayer) 1781 && (curLayer->hasVisibleContent() || descendentLayerPaintsIntoAncestor(*curLayer))) 1777 1782 return true; 1778 1783 } … … 1783 1788 for (size_t i = 0; i < listSize; ++i) { 1784 1789 RenderLayer* curLayer = posZOrderList->at(i); 1785 if (!c urLayer->isComposited()1786 && (curLayer->hasVisibleContent() || hasVisibleNonCompositingDescendant(*curLayer)))1790 if (!compositedWithOwnBackingStore(curLayer) 1791 && (curLayer->hasVisibleContent() || descendentLayerPaintsIntoAncestor(*curLayer))) 1787 1792 return true; 1788 1793 } … … 1794 1799 1795 1800 // Conservative test for having no rendered children. 1796 bool RenderLayerBacking:: hasVisibleNonCompositingDescendantLayers() const1797 { 1798 return hasVisibleNonCompositingDescendant(m_owningLayer);1801 bool RenderLayerBacking::isPaintDestinationForDescendentLayers() const 1802 { 1803 return descendentLayerPaintsIntoAncestor(m_owningLayer); 1799 1804 } 1800 1805 -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r169046 r169053 76 76 // Returns true if layer configuration changed. 77 77 bool updateConfiguration(); 78 78 79 // Update graphics layer position and bounds. 79 void updateGeometry(); // make private 80 void updateGeometry(); 81 82 // Update state the requires that descendant layers have been updated. 83 void updateAfterDescendents(); 84 80 85 // Update contents and clipping structure. 81 86 void updateDrawsContent(); … … 283 288 void resetContentsRect(); 284 289 285 bool hasVisibleNonCompositingDescendantLayers() const;290 bool isPaintDestinationForDescendentLayers() const; 286 291 287 292 bool shouldClipCompositedBounds() const; -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r169045 r169053 1518 1518 childLayersOfEnclosingLayer.append(layerBacking->childForSuperlayers()); 1519 1519 } 1520 1521 if (RenderLayerBacking* layerBacking = layer.backing()) 1522 layerBacking->updateAfterDescendents(); 1520 1523 } 1521 1524 … … 1752 1755 } 1753 1756 } 1757 1758 if (RenderLayerBacking* layerBacking = layer.backing()) 1759 layerBacking->updateAfterDescendents(); 1754 1760 } 1755 1761 … … 1767 1773 1768 1774 layerBacking->updateGeometry(); 1769 if (compositedChildrenOnly) 1775 if (compositedChildrenOnly) { 1776 layerBacking->updateAfterDescendents(); 1770 1777 return; 1778 } 1771 1779 } 1772 1780 } … … 1803 1811 } 1804 1812 } 1805 } 1806 1813 1814 if (&layer != &compositingAncestor) { 1815 if (RenderLayerBacking* layerBacking = layer.backing()) 1816 layerBacking->updateAfterDescendents(); 1817 } 1818 } 1807 1819 1808 1820 void RenderLayerCompositor::repaintCompositedLayers(const IntRect* absRect)
Note: See TracChangeset
for help on using the changeset viewer.