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

Issue 833135 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

backface-visibility: hidden makes image resize in nearest-neighbor (low quality)

Reported by human.p...@gmail.com, Apr 15 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.106 Safari/537.36

Steps to reproduce the problem:
1. Open the test.html or http://jsbin.com/yuqufawequ/edit?html,output

What is the expected behavior?
Both image should be resized properly using high quality scaling algorithm.

What went wrong?
When style backface-visibility is set to hidden, image is resized with NN interpolation (aliasing, and generally bad quality).

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 66.0.3359.106  Channel: beta
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

Can also reproduce in Version 68.0.3397.0 (Official Build) canary (64-bit)
 
test.html
171 bytes View Download
result.png
93.9 KB View Download
Labels: Needs-Triage-M66
Cc: sindhu.chelamcherla@chromium.org
Labels: M-68 FoundIn-68 Triaged-ET Target-68 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on reported version 66.0.3359.106 and on latest canary 68.0.3397.0 using Windows 10, Mac 10.13.3 and Ubuntu 14.04.

This issue is seen from M-60. Hence considering this issue as Non-Regression and marking as Untriaged.

NOTE:Issue is working fine in Firefox

Thanks!

Comment 3 by e...@chromium.org, Apr 18 2018

Components: -Blink>CSS Blink>Paint
Components: -Blink>Paint Blink>Image Blink>Compositing
Owner: vmp...@chromium.org
Status: Assigned (was: Untriaged)
For some reason when it gets a composited layer (will-change: transform is enough) the image sampling goes bad. vmpstr@, do you know why this is?

Comment 5 by vmp...@chromium.org, Apr 18 2018

Cc: ericrk@chromium.org
Components: -Blink>Compositing -Blink>Image Internals>Compositing>Rasterization Internals>Compositing>Images
Labels: Hotlist-ImageWG
Owner: khushals...@chromium.org
When the image is promoted to a separate layer, it goes down the directly composited image path, which rasterizes at a power of two scale and then uses the the texture throughout. We also have scale banding to prevent changing the scale frequently on up-and-down animations. All in all, in this specific example, we rasterize the image at scale 1 (height: 768) and then use the gpu to downscale it to the needed scale (height: 300). In the non-directly composited case, we downscale the image to a power of two (height: 384), rasterize it, and use the gpu to scale down to needed scale (height: 300). 

Now I've tried to hack the code to rasterize at scale 0.5 initially, which theoretically should produce the same results, but it didn't. It did look different, but not the same. 

As for why the image is being directly composited, I imagine the intent is that if you specify a backface visibility, it's a hint that a transform is likely to be applied which would promote this to a layer anyway. 

-> khushalsagar to see if anything can be done here, although my feeling is that this is one of the cases where we can't do much

+ericrk as well.

Sign in to add a comment