New issue
Advanced search Search tips

Issue 698464 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 417782



Sign in to add a comment

[root layer scrolls] stop creating PLC layers

Project Member Reported by skobes@chromium.org, Mar 4 2017

Issue description

Right now the composited layer tree with --root-layer-scrolls looks like this:

VV::Root Transform Layer
    VV::Inner Viewport Container Layer
        VV::Overscroll Elasticity Layer
            VV::Page Scale Layer
                VV::Inner Viewport Scroll Layer
                    PLC::Frame Overflow Controls Host Layer
                        PLC::Frame Clipping Layer
                            PLC::Frame Scrolling Layer
                                PLC::Content Root Layer
                                    CLM::LayoutView #document
                                        CLM::Scrolling Layer
                                            CLM::Scrolling Contents Layer
        CLM::Overflow Controls Host Layer
            CLM::Horizontal Scrollbar Layer
            CLM::Vertical Scrollbar Layer
            CLM::Scroll Corner Layer

[VV = VisualViewport, PLC = PaintLayerCompositor, CLM = CompositedLayerMapping]

Because frame scrolling now happens through the CLM's layers, we should stop creating the four PLC layers:

  Frame Overflow Controls Host Layer
  Frame Clipping Layer
  Frame Scrolling Layer
  Content Root Layer

Instead we will add the LayoutView's main GraphicsLayer directly to the bottommost VisualViewport layer, producing the following tree:

VV::Root Transform Layer
    VV::Inner Viewport Container Layer
        VV::Overscroll Elasticity Layer
            VV::Page Scale Layer
                VV::Inner Viewport Scroll Layer
                    CLM::LayoutView #document
                        CLM::Scrolling Layer
                            CLM::Scrolling Contents Layer
        CLM::Overflow Controls Host Layer
            CLM::Horizontal Scrollbar Layer
            CLM::Vertical Scrollbar Layer
            CLM::Scroll Corner Layer

(To print the composited layer tree, run "content_shell --expose-internals-for-testing https://output.jsbin.com/jujamaj/quiet".)
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/16beff659fc7bc169da48a13d926e05b01053bea

commit 16beff659fc7bc169da48a13d926e05b01053bea
Author: skobes <skobes@chromium.org>
Date: Mon Mar 06 20:15:30 2017

Separate VisualViewport layer tree creation from attachment.

This paves the way for deferring attachment.  With root layer scrolling the
layer passed to WebViewImpl::setRootGraphicsLayer will be the LayoutView's main
GraphicsLayer, which does not exist until after the compositing update.

BUG= 698464 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2735543002
Cr-Commit-Position: refs/heads/master@{#454934}

[modify] https://crrev.com/16beff659fc7bc169da48a13d926e05b01053bea/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[modify] https://crrev.com/16beff659fc7bc169da48a13d926e05b01053bea/third_party/WebKit/Source/core/frame/VisualViewport.cpp
[modify] https://crrev.com/16beff659fc7bc169da48a13d926e05b01053bea/third_party/WebKit/Source/core/frame/VisualViewport.h
[modify] https://crrev.com/16beff659fc7bc169da48a13d926e05b01053bea/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
[modify] https://crrev.com/16beff659fc7bc169da48a13d926e05b01053bea/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.h
[modify] https://crrev.com/16beff659fc7bc169da48a13d926e05b01053bea/third_party/WebKit/Source/core/loader/EmptyClients.cpp
[modify] https://crrev.com/16beff659fc7bc169da48a13d926e05b01053bea/third_party/WebKit/Source/web/WebViewImpl.cpp

Project Member

Comment 2 by bugdroid1@chromium.org, Mar 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/430eac0573a75c2b35358c9aa280428c738b473f

commit 430eac0573a75c2b35358c9aa280428c738b473f
Author: skobes <skobes@chromium.org>
Date: Tue Mar 07 22:29:10 2017

[RLS] Document's main GraphicsLayer size should not include overflow.

This was first done in http://crrev.com/367034 but partially regressed in
http://crrev.com/444539.

BUG= 698464 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2736513002
Cr-Commit-Position: refs/heads/master@{#455255}

[modify] https://crrev.com/430eac0573a75c2b35358c9aa280428c738b473f/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/430eac0573a75c2b35358c9aa280428c738b473f/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp

Project Member

Comment 3 by bugdroid1@chromium.org, Mar 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/115e9610c49a6cc1970918a17bba42ba392de0d6

commit 115e9610c49a6cc1970918a17bba42ba392de0d6
Author: skobes <skobes@chromium.org>
Date: Wed Mar 08 01:29:54 2017

Defer ChromeClient::attachRootGraphicsLayer until after compositing update.

This paves the way for PLC::rootGraphicsLayer to read from the LayoutView's
CompositedLayerMapping in root layer scrolling mode.

BUG= 698464 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2736523002
Cr-Commit-Position: refs/heads/master@{#455325}

[modify] https://crrev.com/115e9610c49a6cc1970918a17bba42ba392de0d6/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
[modify] https://crrev.com/115e9610c49a6cc1970918a17bba42ba392de0d6/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.h
[modify] https://crrev.com/115e9610c49a6cc1970918a17bba42ba392de0d6/third_party/WebKit/Source/web/WebViewImpl.cpp

Project Member

Comment 4 by bugdroid1@chromium.org, Mar 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a2d48d4e791055524b1dd7870ed2674c98cc6bfc

commit a2d48d4e791055524b1dd7870ed2674c98cc6bfc
Author: skobes <skobes@chromium.org>
Date: Thu Mar 09 02:20:02 2017

Let PagePopupChromeClient schedule frames before attachRootGraphicsLayer.

This fixes a chicken-and-egg problem introduced by http://crrev.com/455325.
WebPagePopupImpl sets m_isAcceleratedCompositingActive during the first
compositing update, which scheduleAnimation wouldn't schedule without the bit.

WebPagePopupImpl now eagerly initializes m_layerTreeView, which matches what
WebViewImpl does for non-popup content.

BUG= 699412 , 698464 

Review-Url: https://codereview.chromium.org/2737193002
Cr-Commit-Position: refs/heads/master@{#455642}

[modify] https://crrev.com/a2d48d4e791055524b1dd7870ed2674c98cc6bfc/third_party/WebKit/Source/web/WebPagePopupImpl.cpp
[modify] https://crrev.com/a2d48d4e791055524b1dd7870ed2674c98cc6bfc/third_party/WebKit/Source/web/WebPagePopupImpl.h

Project Member

Comment 5 by bugdroid1@chromium.org, Mar 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/13e9d344a202ab2d800c64f9c3f0beef605651d9

commit 13e9d344a202ab2d800c64f9c3f0beef605651d9
Author: skobes <skobes@chromium.org>
Date: Fri Mar 10 01:40:33 2017

[RLS] Don't create PaintLayerCompositor layers.

In root layer scrolling mode, the main GraphicsLayer in the LayoutView's
CompositedLayerMapping is now connected directly to the VisualViewport scroll
layer (in the main frame), or to the layer of an owning LayoutIFrame.

BUG= 698464 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2728273002
Cr-Commit-Position: refs/heads/master@{#455954}

[modify] https://crrev.com/13e9d344a202ab2d800c64f9c3f0beef605651d9/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[add] https://crrev.com/13e9d344a202ab2d800c64f9c3f0beef605651d9/third_party/WebKit/LayoutTests/compositing/layer-tree-expected.txt
[add] https://crrev.com/13e9d344a202ab2d800c64f9c3f0beef605651d9/third_party/WebKit/LayoutTests/compositing/layer-tree.html
[add] https://crrev.com/13e9d344a202ab2d800c64f9c3f0beef605651d9/third_party/WebKit/LayoutTests/flag-specific/root-layer-scrolls/compositing/layer-tree-expected.txt
[modify] https://crrev.com/13e9d344a202ab2d800c64f9c3f0beef605651d9/third_party/WebKit/Source/core/frame/FrameView.cpp
[modify] https://crrev.com/13e9d344a202ab2d800c64f9c3f0beef605651d9/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
[modify] https://crrev.com/13e9d344a202ab2d800c64f9c3f0beef605651d9/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.h
[modify] https://crrev.com/13e9d344a202ab2d800c64f9c3f0beef605651d9/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp
[modify] https://crrev.com/13e9d344a202ab2d800c64f9c3f0beef605651d9/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
[modify] https://crrev.com/13e9d344a202ab2d800c64f9c3f0beef605651d9/third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Comment 6 by skobes@chromium.org, Mar 10 2017

Status: Fixed (was: Started)

Sign in to add a comment