backdrop-filter bounds aren't set by ui::Layer |
||
Issue descriptionThe backdrop-filter bounds aren't set by ui::Layer, because when they are, they chop off part of the shelf. See crbug.com/920296 for an example, and see https://chromium-review.googlesource.com/c/chromium/src/+/1415171 for a CL patching the problem. It would be better to get the bounds set correctly here.
,
Jan 18
(4 days ago)
Actually, this avoids unit test DCHECK failures on empty rects:
void Layer::RecomputeBackdropBounds() {
gfx::RRectF backdrop_filter_bounds =
gfx::RRectF(0, 0, bounds().width(), bounds().height(), 0);
if (!backdrop_filter_bounds.IsEmpty())
backdrop_filter_bounds.Scale(GetDeviceScaleFactor());
cc_layer_->SetBackdropFilterBounds(backdrop_filter_bounds);
}
,
Jan 18
(4 days ago)
|
||
►
Sign in to add a comment |
||
Comment 1 by masonfreed@chromium.org
, Jan 17 (5 days ago)in ui/compositor/Layer.cc, this used to be the code: void Layer::RecomputeBackdropBounds() { gfx::RectF backdrop_filter_bounds = gfx::RectF(bounds().width(), bounds().height()); backdrop_filter_bounds.Scale(GetDeviceScaleFactor()); cc_layer_->SetBackdropFilterBounds(backdrop_filter_bounds); }