Background blur not working with rounded corners on TrayBubbleView |
|||||
Issue descriptionChrome Version: 65.0.3317.0 (Developer Build) (64-bit) OS: Chrome OS What steps will reproduce the problem? (1) Checkout https://crrev.com/c/844406 (2) Comment out line #102 of web_notification_tray.cc in PatchSet #1. The line disables mask layer that is making the rounded corner of TrayBubbleView. bubble_view->layer()->parent()->SetMaskLayer(nullptr); https://crrev.com/c/844406/1/ash/system/web_notification/web_notification_tray.cc#102 (3) Open Notification Center from the right bottom of the shelf. What is the expected result? Background blur should be enabled even if the mask layer is set. What happens instead? Background blur is disabled. reveman@: Please triage. Thank you.
,
Jan 15 2018
+people who might be familiar with the questions I'm not familiar with how Views internally works so I have no idea how we can fix this. My questions are: * What is the alternative approach to round corners other than using mask layers? * TrayBubbleView is used in many parts of Chrome OS. Are there any cases where the alternative approach does not work and mask layers should be used? If not, why mask layers are used here historically? * Who is the right person to ask?
,
Jan 15 2018
You can set the layer to non-opaque and then paint whatever shape on it, which would give you a rounded corner effect, but the bg blur works on what you can see *through* the layer, so the corners would still be blurred, presumably. So, tldr I don't think there's another way unless we change the SetBackgroundBlur api. * Who is the right person to ask? I've never figured this out, there doesn't seem to be a "views's use of layers" guru.
,
Jan 17 2018
estade@: Thank you for the information. I would try to consider changing ui::Layer::SetBackgroundBlur. The method seems to be used only from app_list now, so we don't have to care much about regression.
,
Feb 1 2018
tetsui@, why do you use the flag app_list::features::IsBackgroundBlurEnabled in your cl? This flag is default off unless it is EVE. Did you go to the chrome://flags to turn on "Enable background blur"?
,
Feb 1 2018
tetsui@, I played with your patch, and the rounded corner blur works. I will comment on your cl, so that you know what I changed.
,
Feb 1 2018
,
Feb 5 2018
wutao@ kindly found the way to do this, and it turned out it works as intended. Thank you so much for your help!
,
Feb 5 2018
The working version is patchset #2 of https://crrev.com/c/844406 . |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by reve...@chromium.org
, Jan 10 2018