haikuwebkit/LayoutTests/compositing/fixed-position-changed-in-c...

2 lines
1 B
Raw Permalink Normal View History

Hardware-backed renderLayer could avoid repainting during a positioned movement layout https://bugs.webkit.org/show_bug.cgi?id=74370 Reviewed by Simon Fraser. Source/WebCore: Tests: compositing/absolute-position-changed-in-composited-layer.html compositing/absolute-position-changed-with-composited-parent-layer.html compositing/fixed-position-changed-in-composited-layer.html compositing/fixed-position-changed-within-composited-parent-layer.html To be able to properly skip repainting after a positioned movement layout only, we needed to add more state to the current |setNeedsFullRepaint| method. As part of that we refactored the callers and internal fields to better match the new meaning. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::styleDidChange): Explicitely gave the RepaintStatus to setRepaintStatus. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::removeOnlyThisLayer): Updated those function after the renamings. (WebCore::RenderLayer::updateLayerPositions): Ditto. Also added a sholdRepaintAfterLayout check. (WebCore::RenderLayer::shouldRepaintAfterLayout): Heart of the optimization, if we just did a positioned movement layout of composited RenderLayer, then don't repaint. All the other cases should still trigger a repaint. * rendering/RenderLayer.h: (WebCore::RenderLayer::setRepaintStatus): Renamed setNeedsFullRepaint to setRepaintStatus. Also added a new enum RepaintStatus. * rendering/RenderObject.cpp: (WebCore::RenderObject::setLayerNeedsFullRepaint): Updated after the renamings. (WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout): New method that pass a new value to the RenderLayer. * rendering/RenderObject.h: (WebCore::RenderObject::setNeedsPositionedMovementLayout): Switched the call to the dedicated method. LayoutTests: I did not find any test covering positioned movement layout with composited layers so I added some testing. * compositing/absolute-position-changed-in-composited-layer-expected.png: Added. * compositing/absolute-position-changed-in-composited-layer-expected.txt: Added. * compositing/absolute-position-changed-in-composited-layer.html: Added. * compositing/absolute-position-changed-with-composited-parent-layer-expected.png: Added. * compositing/absolute-position-changed-with-composited-parent-layer-expected.txt: Added. * compositing/absolute-position-changed-with-composited-parent-layer.html: Added. * compositing/fixed-position-changed-in-composited-layer-expected.png: Added. * compositing/fixed-position-changed-in-composited-layer-expected.txt: Added. * compositing/fixed-position-changed-in-composited-layer.html: Added. * compositing/fixed-position-changed-within-composited-parent-layer-expected.png: Added. * compositing/fixed-position-changed-within-composited-parent-layer-expected.txt: Added. * compositing/fixed-position-changed-within-composited-parent-layer.html: Added. Canonical link: https://commits.webkit.org/91318@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-12-15 17:55:47 +00:00