New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 886389 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 26
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

will-change:opacity shouldn't need to repaint when changing opacity.

Project Member Reported by flackr@chromium.org, Sep 19

Issue description

Chrome Version: 70.0.3538.16 (Official Build) dev (64-bit)
OS: ChromeOS

What steps will reproduce the problem?
(1) Visit http://jsbin.com/xadoxoq/edit?html,css,js,output
(2) Turn on "Paint flashing" in dev tools
(3) Click on the first gray box.

What is the expected result?
The box should not repaint as the opacity changes from 1 to 0.999 as it is annotated with will-change: opacity.

What happens instead?
The box repaints (flashing green when paint flashing is turned on).

Interestingly the box is already drawn into a separate layer due to the will-change hint so perhaps the paint invalidation is just unnecessary.
 
Status: Available (was: Untriaged)
Is the point that the compositor should adjust the opacity, or is the point that we can't distinguish 0.999 from 1 so we shouldn't repaint?
Cc: alexst@chromium.org
Labels: -Pri-3 Pri-1
The issue is that when will-change : opacity is present, changing opacity from 1 to 0.999 should be done in the compositor by applying opacity to textures already on the GPU in the shader without repainting.

Tiles are already cached and CSS animation going from 0.999 to 1 does not change their contents.

I'm upping priority, this is really affecting us on consumer hardware team and causing a ton of jank when we try to do transitions causing us to resort to workarounds.
Owner: vmp...@chromium.org
Status: Assigned (was: Available)
vmpstr@, could you take a look at this, or suggest someone with the bandwidth to do it?

The first question that comes to mind is whether we _always_ composite with will-change: opacity. Second question is why we even repaint when the opacity has not changed enough to change representation.
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 25

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

commit 63b7568b3e04002249f085d4407f00d16fc20dbe
Author: Vladimir Levin <vmpstr@chromium.org>
Date: Tue Sep 25 21:44:51 2018

Make will-change: opacity induce an effect node.

When we specify will-change: opacity, it is a hint to the browser that
opacity will change. In order to make this perform well, we should
induce an effect node so that we don't have to repaint when the
opacity actually changes. This patch makes it so.

R=pdr@chromium.org, wangxianzhu@chromium.org

Bug:  886389 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: If0979d48f322564d61ad8434eb4435fc8e8f2602
Reviewed-on: https://chromium-review.googlesource.com/1240993
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594115}
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/compositing/will-change/composited-layers-expected.txt
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor150/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor200/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/platform/linux/virtual/scalefactor200withzoom/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/scalefactor200/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/scalefactor200/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/scalefactor200/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[add] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/platform/mac/virtual/scalefactor150/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/platform/mac/virtual/scalefactor200/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[add] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/platform/mac/virtual/scalefactor200withzoom/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor150/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/WebKit/LayoutTests/platform/win/virtual/scalefactor200withzoom/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[delete] https://crrev.com/18c7186d821de890abcc39dfd8cc8ad5bbb28e08/third_party/WebKit/LayoutTests/virtual/scalefactor150/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[delete] https://crrev.com/18c7186d821de890abcc39dfd8cc8ad5bbb28e08/third_party/WebKit/LayoutTests/virtual/scalefactor200withzoom/fast/hidpi/static/validation-bubble-appearance-hidpi-expected.png
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
[modify] https://crrev.com/63b7568b3e04002249f085d4407f00d16fc20dbe/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc

Status: Fixed (was: Assigned)

Sign in to add a comment