Use TilesBacking for iframes when async frame scrolling is enabled
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Sep 2017 13:38:10 +0000 (13:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Sep 2017 13:38:10 +0000 (13:38 +0000)
commit0b8ce0f86e3d053fcdb65c5e3521dd01ce885a66
tree71541cfd83b9c4283cec1bfeb487e4c313454b3d
parent09140a8f28fd53ab3d536c40a738c5e412864267
Use TilesBacking for iframes when async frame scrolling is enabled
https://bugs.webkit.org/show_bug.cgi?id=173644

Patch by Frederic Wang <fwang@igalia.com> on 2017-09-05
Reviewed by Simon Fraser.

Source/WebCore:

This patch adds creation of TilesBacking for non-main frames when async frame scrolling is
enabled. RenderLayerBacking::m_isMainFrameLayerWithTiledBacking is also renamed to reflect
that tiled backing is not exclusive to the main frame. More adjustments might be needed for
non-main frames and will be handled in follow-up commits.

Test: compositing/tiling/tiled-drawing-async-frame-scrolling.html

* rendering/RenderLayerBacking.cpp: Rename m_isMainFrameLayerWithTiledBacking
* rendering/RenderLayerBacking.h: Rename isMainFrameLayerWithTiledBacking and
m_isMainFrameLayerWithTiledBacking.
* rendering/RenderLayerCompositor.cpp: Use isFrameLayerWithTiledBacking

Source/WebKit:

This patch adds creation of TilesBacking for non-main frames when async frame scrolling is
enabled. RenderLayerBacking::m_isMainFrameLayerWithTiledBacking is also renamed to reflect
that tiled backing is not exclusive to the main frame. More adjustments might be needed for
non-main frames and will be handled in follow-up commits.

* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::shouldUseTiledBackingForFrameView): Also use tiled
backing when asyncFrameScrollingEnabled is true.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::shouldUseTiledBackingForFrameView): Ditto.

LayoutTests:

This patch adds a test to verify the graphic layers created for frames when async scrolling
is enabled. On iOS and macOS and WK2, new layers appear for the tiled content, scroll bars...

* compositing/tiling/tiled-drawing-async-frame-scrolling-expected.txt: Added.
* compositing/tiling/tiled-drawing-async-frame-scrolling.html: Added.
* platform/ios-wk2/compositing/tiling/tiled-drawing-async-frame-scrolling-expected.txt: Added.
* platform/mac-wk2/compositing/tiling/tiled-drawing-async-frame-scrolling-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/compositing/tiling/tiled-drawing-async-frame-scrolling-expected.txt [new file with mode: 0644]
LayoutTests/compositing/tiling/tiled-drawing-async-frame-scrolling.html [new file with mode: 0644]
LayoutTests/platform/ios-wk2/compositing/tiling/tiled-drawing-async-frame-scrolling-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/compositing/tiling/tiled-drawing-async-frame-scrolling-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm
Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm