New issue
Advanced search Search tips

Issue 741858 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 711468



Sign in to add a comment

[root layer scrolls] text antialiasing diffs

Project Member Reported by skobes@chromium.org, Jul 12 2017

Issue description

On Linux trunk, every layout test with pixel dumps seems to be failing with --root-layer-scrolls due to single-pixel diffs in the text antialiasing.

This definitely used to work.

$ echo "Hello world" > third_party/WebKit/LayoutTests/html/hello.html
$ blink/tools/run_layout_tests.sh --reset-results html/hello.html
...
Writing new expected result "html/hello-expected.txt"
Writing new expected result "html/hello-expected.png"
The test ran as expected.     

$ blink/tools/run_layout_tests.sh --additional-driver-flag=--root-layer-scrolls html/hello.html
...
[1/1] html/hello.html failed unexpectedly (image diff)
                              
0 tests ran as expected, 1 didn't:


Regressions: Unexpected image-only failures (1)
  html/hello.html [ Failure ]
 
test-results.png
29.3 KB View Download

Comment 1 by skobes@chromium.org, Jul 12 2017

Labels: -Type-Bug Type-Bug-Regression

Comment 2 by skobes@chromium.org, Jul 12 2017

Components: Blink>Scroll
Owner: skobes@chromium.org
Status: Started (was: Unconfirmed)
This regressed sometime in the past month (r473100 - r486026).  I'm bisecting now.

I'd be inclined to ignore / rebaseline these if it was just one or two tests, but when it's literally every test with any amount of text the baselines will cause a lot of pain.

Comment 3 by skobes@chromium.org, Jul 13 2017

Cc: bokan@chromium.org
Bisect implicates http://crrev.com/481209 ("Force rootScroller to create composited scroll layers").  Still investigating how - @bokan do you have any idea?

Comment 4 by skobes@chromium.org, Jul 13 2017

Found the cause - pages without overflow are having their backgrounds painted into the main GraphicsLayer instead of the scrolling contents layer.

Fix in progress.

Comment 5 by skobes@chromium.org, Jul 13 2017

(The manifestation of this bug in Chrome is that we lose subpixel antialiasing.  It's a blessing in disguise that content_shell caught this despite not doing subpixel AA.)

Comment 6 by skobes@chromium.org, Jul 13 2017

Labels: OS-Mac OS-Windows

Comment 7 by bokan@chromium.org, Jul 14 2017

Yes, I missed that consequence in the patch, sorry about that and thanks for picking it up! The fix then is to use the paint background into scrolling content layer path, yes?

Curious, content_shell doesn't do subpixel AA? Any idea where the diffs come from in that case? 

Comment 8 by skobes@chromium.org, Jul 14 2017

Yep, the fix is to paint the background into the scrolling contents layer.

By default I get subpixel AA from chrome but only grayscale AA from content_shell.  I haven't figured out if there is some flag to get content_shell to do it (--enable-lcd-text doesn't work).

In theory grayscale AA on a transparent background with a white layer behind it should be identical to grayscale AA on a white background, but in practice some pixels are just slightly off.  I'm guessing it's floating-point rounding errors somewhere in the compositing pipeline.
Project Member

Comment 9 by bugdroid1@chromium.org, Jul 18 2017

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

commit 9e0775c12ad128945061bcd5bf1265ab1e90b4d3
Author: Steve Kobes <skobes@chromium.org>
Date: Tue Jul 18 19:36:42 2017

Let backgrounds paint in scrolling contents layer without overflow.

Since r481209, the document creates composited scrolling layers with RLS even if
it doesn't overflow.  But PaintLayer::GetBackgroundPaintLocation didn't get the
memo.

Bug:  741858 
Change-Id: I1fe09532eecc2bbd1b71c42e171bf86f4a893382
Reviewed-on: https://chromium-review.googlesource.com/570940
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487557}
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/linux/virtual/rootlayerscrolls/scrollbars/basic-scrollbar-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/linux/virtual/rootlayerscrolls/scrollbars/border-box-rect-clips-scrollbars-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/linux/virtual/rootlayerscrolls/scrollbars/custom-scrollbar-appearance-property-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/linux/virtual/rootlayerscrolls/scrollbars/disabled-scrollbar-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/linux/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/linux/virtual/rootlayerscrolls/scrollbars/scrollbar-buttons-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/linux/virtual/rootlayerscrolls/scrollbars/scrollbar-orientation-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/linux/virtual/rootlayerscrolls/scrollbars/scrollbars-on-positioned-content-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/rootlayerscrolls/scrollbars/border-box-rect-clips-scrollbars-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/rootlayerscrolls/scrollbars/scrollbars-on-positioned-content-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/mac/virtual/rootlayerscrolls/scrollbars/border-box-rect-clips-scrollbars-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/mac/virtual/rootlayerscrolls/scrollbars/custom-scrollbar-appearance-property-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/mac/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/mac/virtual/rootlayerscrolls/scrollbars/scrollbars-on-positioned-content-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/win/virtual/rootlayerscrolls/scrollbars/border-box-rect-clips-scrollbars-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/win/virtual/rootlayerscrolls/scrollbars/custom-scrollbar-appearance-property-expected.png
[delete] https://crrev.com/b650c38e592cc27ed3572a8ef6d4290b9457e98f/third_party/WebKit/LayoutTests/platform/win/virtual/rootlayerscrolls/scrollbars/scrollbars-on-positioned-content-expected.png
[modify] https://crrev.com/9e0775c12ad128945061bcd5bf1265ab1e90b4d3/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/9e0775c12ad128945061bcd5bf1265ab1e90b4d3/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
[modify] https://crrev.com/9e0775c12ad128945061bcd5bf1265ab1e90b4d3/third_party/WebKit/Source/core/paint/ViewPainter.cpp

Comment 10 by bokan@chromium.org, Jul 18 2017

FYI: Filed issue 745946 to make it a little harder to unknowingly break subpixel AA
Status: Fixed (was: Started)

Sign in to add a comment