New issue
Advanced search Search tips

Issue 778060 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

set should_flatten_transform_ on CLM::scrolling_layer_?

Project Member Reported by skobes@chromium.org, Oct 25 2017

Issue description

Today, CLM::UpdateShouldFlattenTransform calls

  scrolling_layer_->SetShouldFlattenTransform(false);

overriding the default of true.  The comment says having it flatten "causes unclipped render surfaces" and references  issue 521768 .

pdr thinks we might be able to remove this now.  It causes diffs in layer tree output with root layer scrolling, for example in compositing/fixed-body-background-positioned.html, which has:

  "transforms": [
    {
      "id": 1,
      "transform": [
        [1, 0, 0, 0],
        [0, 1, 0, 0],
        [0, 0, 1, 0],
        [0, -200, 0, 1]
      ],
      "flattenInheritedTransform": false
    }
  ]

Note that the "flattenInheritedTransform" JSON field is present only when false, and is based on the parent GraphicsLayer's should_flatten_transform_ bit.

With RLS, the transform is on the scrolling contents layer, so its parent is the CLM::scrolling_layer_.

Without RLS, the transform is on the document's main GraphicsLayer, so its parent is the PLC::root_content_layer_, which has the default value should_flatten_transform_ == true.
 

Comment 1 by trchen@chromium.org, Oct 25 2017

Doing so would kill parallax, which we do support today.

Comment 2 by pdr@chromium.org, Oct 25 2017

Isn't parallax scrolling possible on non-root scrollers? If so, how would that work if they flatten inherited transforms?

The call to not flatten the root layers was added in  http://crbug.com/521768  to fix (workaround?) a clipping bug. Is that comment just out of date?
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMapping.cpp?type=cs&q=521768&sq=package:chromium&l=2332

Comment 3 by skobes@chromium.org, Oct 25 2017

FYI the code in CLM::UpdateShouldFlattenTransform isn't specific to the root layer.  Sorry if that was unclear.
Project Member

Comment 4 by sheriffbot@chromium.org, Oct 25

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: -trchen@chromium.org
Status: Available (was: Untriaged)

Sign in to add a comment