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

Issue 920296 link

Starred by 4 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: ----


Participants' hotlists:
Launcher-Broken


Sign in to add a comment

Shelf looks half chopped off (potential issues around opacity, blur, color and how they are set on layers)

Project Member Reported by newcomer@chromium.org, Jan 9

Issue description

There was a change to layers which means we need to set the opacity of a layer with blur in the layers color, not on the layer itself.

The shelf currently sets opacity on the layer, this causes an aliasing effect and no longer works (see ToT).

See issue 914073 for the issue in the launcher.

See this example CL for how it was fixed in the launcher:
https://chromium-review.googlesource.com/c/chromium/src/+/1382866

 
Components: -UI>Shell>Launcher UI>Shell>Shelf
Summary: Background blur of the shelf needs to be set on the color, not the layer (was: Background blur needs to be set on the color, not the layer)
https://cs.chromium.org/chromium/src/ash/shelf/shelf_widget.cc?type=cs&q=setbackgroundblur+file:%5Esrc/ash/shelf/+package:%5Echromium$&g=0&l=199
This bug seems to say that the *blur* should be "set on the color, not the layer" but the what the linked CL for the launcher seems to be doing is to set *opacity* on the color rather than the blur layer. Which I think is a little different?
Besides, I'm not quite sure what "setting blur on a color" would really mean?
In the case of the shelf, it doesn't seem like we're setting the opacity on the blur layer, it seems like it's already part of the background color.

But there's definitely something wrong. Attaching the result of 1) the status quo 2) removing the blur, 3) making the shelf fully transparent.
2019_01_15_033937_1198x958_scrot_copy.png
79.8 KB View Download
2019_01_15_045535_1198x958_scrot_copy.png
94.1 KB View Download
2019_01_15_045939_1198x958_scrot_copy.png
87.4 KB View Download
Cc: manucornet@chromium.org
Owner: masonfreed@chromium.org
Yeah it does seem like the main fix in CL 1382866 which is to stop using SetOpacity on the layer (and instead convey opacity through a color with an alpha channel) isn't applicable for the shelf since we never call SetOpacity on the layer that has the blur.

@masonfreed since you've been super helpful in diagnosing what caused the problem for the launcher, any idea what we're doing wrong here? The code is around:

https://cs.chromium.org/chromium/src/ash/shelf/shelf_widget.cc?type=cs&q=setbackgroundblur+file:%5Esrc/ash/shelf/+package:%5Echromium$&g=0&l=199

But I don't think this is the same problem as with the launcher.

Assigning to you to make sure you see this, but please reassign to me afterwards :-) Thanks!
Cc: dcasta...@chromium.org
Ah, you're right. Sorry for the confusing title, not sure what I was thinking! Opacity should be set on the color, not the blurred layer.

+Dcastagna who could have some insight on this as well.

Comment 8 by manucornet@chromium.org, Jan 16 (6 days ago)

Issue 922246 has been merged into this issue.

Comment 9 by manucornet@chromium.org, Jan 16 (6 days ago)

Summary: Shelf looks half chopped off (potential issues around opacity, blur, color and how they are set on layers) (was: Background blur of the shelf needs to be set on the color, not the layer)

Comment 10 by masonfreed@chromium.org, Jan 16 (6 days ago)

Sorry, just noticed this. Taking a look now...

Comment 11 by newcomer@chromium.org, Jan 16 (6 days ago)

May be worth a bisect, I'm not 100% convinced mason's change caused this, but I did notice the regression around the same time as their CL.

Comment 12 by masonfreed@chromium.org, Jan 16 (6 days ago)

Could someone please grab this CL and see if it fixes the issue? I can't currently build/run on a ChromeOS device. :-(

https://chromium-review.googlesource.com/c/chromium/src/+/1415171

If this looks ok, that will confirm my suspicion that the problem is in the calculation (or application) of the clipping rect for the backdrop filter. And if so, that CL could actually be landed, pending a better fix for the clip rect. I could take care of that, but it would be super-helpful if we had some tests for the shelf, launcher, etc. Would it be possible to make a layout-test style test for these things? Something that just confirms they look visually like they're supposed to?

Comment 13 by manucornet@chromium.org, Jan 17 (5 days ago)

@masonfreed Yes, your fix works perfectly. Attaching the "before" and "after" screenshots.

I don't know if it's possible to detect something like this in unit tests, short of doing some kind of image snapshot and comparing to a "gold" state which we don't currently do and may be fairly fragile...

I would guess this is something that would be more feasible at a lower level (same level that your CL is touching)?

Let me know what the best next step is, as far as I'm concerned, landing that pending CL seems to fix this issue completely.

Thanks for looking at this!
nopatch.png
399 KB View Download
withpatch.png
393 KB View Download

Comment 14 by masonfreed@chromium.org, Jan 17 (5 days ago)

Owner: manucornet@chromium.org
Great! I'll fix up that CL and get it landed today.

Can you think about ways to possibly test this stuff? For the web platform, there are WPT tests, and blink's layout tests. Those are quite similar to what we need here - just run the code and make sure the appearance doesn't change. I'm not saying you can reuse that infrastructure, you likely can't. But the idea is quite similar. They are definitely somewhat fragile, depending on how you build them. But they're easy to re-baseline if the appearance changes for a known/planned reason, and you then just have to be careful to look carefully at the output when you re-baseline. Otherwise, it'll watch for you to make sure nothing like this happens in the future. (Particularly with my backdrop-filter changes.) Just a thought!

Comment 15 by manucornet@chromium.org, Jan 18 (5 days ago)

Status: Started (was: Assigned)

Comment 16 by manucornet@chromium.org, Jan 18 (4 days ago)

Owner: masonfreed@chromium.org
I can look into testing opportunities, but that's likely going to be an effort larger than what's tracked by this bug :-) My understanding is that the ball is in your court to submit the fix, so I'll reassign to you -- hope that's okay!

Comment 17 by masonfreed@chromium.org, Jan 18 (4 days ago)

Cc: vollick@chromium.org
No problem, I can take this bug. I'm just waiting on review to land that CL. I chose vollick@ as a reviewer, but would you recommend anyone in particular for this code?

https://chromium-review.googlesource.com/c/chromium/src/+/1415171

Would you mind at least creating a bug to track the need for some sort of testing of the appearance of the shelf/launcher/etc?

Comment 18 by manucornet@chromium.org, Jan 18 (4 days ago)

No problem, I just filed issue 923416

For reviewers, I'm not sure... Have you tried git cl owners?

Comment 19 by newcomer@chromium.org, Jan 18 (4 days ago)

 Issue 922357  has been merged into this issue.

Comment 20 by masonfreed@chromium.org, Jan 19 (4 days ago)

Thanks for creating that bug to add tests, I appreciate it.

vollick@ was the first to come up on git cl owners. Let's give it the weekend and hopefully he'll have a chance Monday.

Comment 21 by manucornet@chromium.org, Today (4 hours ago)

@masonfreed any update? This is a pretty visible bug... Are there other owners who could review your CL?

Sign in to add a comment