haikuwebkit/LayoutTests/compositing/backing/inline-block-no-backing-exp...

73 lines
1.6 KiB
Plaintext
Raw Permalink Normal View History

 
Improve the logic for compositing backing store avoidance https://bugs.webkit.org/show_bug.cgi?id=136556 Reviewed by Dean Jackson. Source/WebCore: Avoid backing store allocation in more cases by improving the logic that detects whether a RenderLayer has any painted, non-layer descendent renderers. Rename RenderLayer::hasNonEmptyChildRenderers() to hasPaintingNonLayerDescendants(), and make it recur 3 levels deep, walking child lists of up to 20 siblings looking for renderers that paint anything. Any renderer with box decorations paints; replaced elements paint, and non-whitespace text nodes paint. We can avoid making backing store when whitespace nodes are present only when user-select is none, since we have to ensure that there's backing store to paint the selection into. Tests: compositing/backing/inline-block-no-backing.html compositing/backing/whitespace-nodes-no-backing.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hasNonEmptyChildRenderers): Call the recursive hasPaintingNonLayerDescendants(). (WebCore::RenderLayer::hasBoxDecorationsOrBackground): (WebCore::RenderLayer::isVisuallyNonEmpty): Do the cheap tests first. Use isRenderReplaced() rather than isReplaced(), since the latter includes inline-blocks. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateConfiguration): Don't run the isSimpleContainerCompositingLayer() logic in the root layer, since it always wants backing store. (WebCore::RenderLayerBacking::updateAfterDescendents): Ditto. (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): isReplaced() includes inline-block, so use isRenderReplaced() instead. LayoutTests: Tests that dump the layer tree (showing backing store) for various combinations of child renderers and whitespace. * compositing/backing/inline-block-no-backing-expected.txt: Added. * compositing/backing/inline-block-no-backing.html: Added. * compositing/backing/whitespace-nodes-no-backing-expected.txt: Added. * compositing/backing/whitespace-nodes-no-backing.html: Added. Canonical link: https://commits.webkit.org/154355@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-05 00:23:05 +00:00
(GraphicsLayer
(anchor 0.00 0.00)
(bounds 800.00 600.00)
(children 1
(GraphicsLayer
(bounds 800.00 600.00)
(contentsOpaque 1)
(children 4
Improve the logic for compositing backing store avoidance https://bugs.webkit.org/show_bug.cgi?id=136556 Reviewed by Dean Jackson. Source/WebCore: Avoid backing store allocation in more cases by improving the logic that detects whether a RenderLayer has any painted, non-layer descendent renderers. Rename RenderLayer::hasNonEmptyChildRenderers() to hasPaintingNonLayerDescendants(), and make it recur 3 levels deep, walking child lists of up to 20 siblings looking for renderers that paint anything. Any renderer with box decorations paints; replaced elements paint, and non-whitespace text nodes paint. We can avoid making backing store when whitespace nodes are present only when user-select is none, since we have to ensure that there's backing store to paint the selection into. Tests: compositing/backing/inline-block-no-backing.html compositing/backing/whitespace-nodes-no-backing.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hasNonEmptyChildRenderers): Call the recursive hasPaintingNonLayerDescendants(). (WebCore::RenderLayer::hasBoxDecorationsOrBackground): (WebCore::RenderLayer::isVisuallyNonEmpty): Do the cheap tests first. Use isRenderReplaced() rather than isReplaced(), since the latter includes inline-blocks. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateConfiguration): Don't run the isSimpleContainerCompositingLayer() logic in the root layer, since it always wants backing store. (WebCore::RenderLayerBacking::updateAfterDescendents): Ditto. (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): isReplaced() includes inline-block, so use isRenderReplaced() instead. LayoutTests: Tests that dump the layer tree (showing backing store) for various combinations of child renderers and whitespace. * compositing/backing/inline-block-no-backing-expected.txt: Added. * compositing/backing/inline-block-no-backing.html: Added. * compositing/backing/whitespace-nodes-no-backing-expected.txt: Added. * compositing/backing/whitespace-nodes-no-backing.html: Added. Canonical link: https://commits.webkit.org/154355@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-05 00:23:05 +00:00
(GraphicsLayer
(position 18.00 18.00)
(bounds 160.00 320.00)
(drawsContent 1)
(children 2
(GraphicsLayer
(position 18.00 10.00)
Improve the logic for compositing backing store avoidance https://bugs.webkit.org/show_bug.cgi?id=136556 Reviewed by Dean Jackson. Source/WebCore: Avoid backing store allocation in more cases by improving the logic that detects whether a RenderLayer has any painted, non-layer descendent renderers. Rename RenderLayer::hasNonEmptyChildRenderers() to hasPaintingNonLayerDescendants(), and make it recur 3 levels deep, walking child lists of up to 20 siblings looking for renderers that paint anything. Any renderer with box decorations paints; replaced elements paint, and non-whitespace text nodes paint. We can avoid making backing store when whitespace nodes are present only when user-select is none, since we have to ensure that there's backing store to paint the selection into. Tests: compositing/backing/inline-block-no-backing.html compositing/backing/whitespace-nodes-no-backing.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hasNonEmptyChildRenderers): Call the recursive hasPaintingNonLayerDescendants(). (WebCore::RenderLayer::hasBoxDecorationsOrBackground): (WebCore::RenderLayer::isVisuallyNonEmpty): Do the cheap tests first. Use isRenderReplaced() rather than isReplaced(), since the latter includes inline-blocks. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateConfiguration): Don't run the isSimpleContainerCompositingLayer() logic in the root layer, since it always wants backing store. (WebCore::RenderLayerBacking::updateAfterDescendents): Ditto. (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): isReplaced() includes inline-block, so use isRenderReplaced() instead. LayoutTests: Tests that dump the layer tree (showing backing store) for various combinations of child renderers and whitespace. * compositing/backing/inline-block-no-backing-expected.txt: Added. * compositing/backing/inline-block-no-backing.html: Added. * compositing/backing/whitespace-nodes-no-backing-expected.txt: Added. * compositing/backing/whitespace-nodes-no-backing.html: Added. Canonical link: https://commits.webkit.org/154355@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-05 00:23:05 +00:00
(bounds 120.00 120.00)
)
(GraphicsLayer
(position 10.00 154.00)
(bounds 120.00 120.00)
)
)
)
(GraphicsLayer
(position 202.00 18.00)
(bounds 160.00 320.00)
(children 2
(GraphicsLayer
(position 10.00 10.00)
(bounds 120.00 120.00)
)
(GraphicsLayer
(position 10.00 154.00)
(bounds 120.00 120.00)
)
)
)
(GraphicsLayer
(position 386.00 18.00)
(bounds 160.00 320.00)
(children 2
(GraphicsLayer
(position 10.00 10.00)
(bounds 120.00 120.00)
)
(GraphicsLayer
(position 10.00 154.00)
(bounds 120.00 120.00)
)
)
)
(GraphicsLayer
(position 570.00 18.00)
(bounds 160.00 320.00)
(children 2
(GraphicsLayer
(position 10.00 10.00)
(bounds 120.00 120.00)
)
(GraphicsLayer
(position 10.00 154.00)
(bounds 120.00 120.00)
)
)
)
Improve the logic for compositing backing store avoidance https://bugs.webkit.org/show_bug.cgi?id=136556 Reviewed by Dean Jackson. Source/WebCore: Avoid backing store allocation in more cases by improving the logic that detects whether a RenderLayer has any painted, non-layer descendent renderers. Rename RenderLayer::hasNonEmptyChildRenderers() to hasPaintingNonLayerDescendants(), and make it recur 3 levels deep, walking child lists of up to 20 siblings looking for renderers that paint anything. Any renderer with box decorations paints; replaced elements paint, and non-whitespace text nodes paint. We can avoid making backing store when whitespace nodes are present only when user-select is none, since we have to ensure that there's backing store to paint the selection into. Tests: compositing/backing/inline-block-no-backing.html compositing/backing/whitespace-nodes-no-backing.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hasNonEmptyChildRenderers): Call the recursive hasPaintingNonLayerDescendants(). (WebCore::RenderLayer::hasBoxDecorationsOrBackground): (WebCore::RenderLayer::isVisuallyNonEmpty): Do the cheap tests first. Use isRenderReplaced() rather than isReplaced(), since the latter includes inline-blocks. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateConfiguration): Don't run the isSimpleContainerCompositingLayer() logic in the root layer, since it always wants backing store. (WebCore::RenderLayerBacking::updateAfterDescendents): Ditto. (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): isReplaced() includes inline-block, so use isRenderReplaced() instead. LayoutTests: Tests that dump the layer tree (showing backing store) for various combinations of child renderers and whitespace. * compositing/backing/inline-block-no-backing-expected.txt: Added. * compositing/backing/inline-block-no-backing.html: Added. * compositing/backing/whitespace-nodes-no-backing-expected.txt: Added. * compositing/backing/whitespace-nodes-no-backing.html: Added. Canonical link: https://commits.webkit.org/154355@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-05 00:23:05 +00:00
)
)
)
)