Commit 3856a7a9 authored by Daniele Castagna's avatar Daniele Castagna Committed by Commit Bot

ui: Lower applist and shelf blur quality

crrev.com/c/1300235 introduced the option to lower the quality of backdrop
filters.

This CL lowers the quality of the backdrop blur one the shelf and the
applist shield.

In this way the texture allocations needed to apply the filter by cc will
be significantly smaller/faster and applying the filter itself will also
be faster on the GPU.

Bug: 897369
Change-Id: I57be9434c02b77b38315e0f998d23eda5d277e43
Reviewed-on: https://chromium-review.googlesource.com/c/1306234Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603660}
parent 45f2082b
......@@ -96,6 +96,9 @@ constexpr int kAppListBackgroundRadius = 28;
// home launcher gestures, if they can be processed.
constexpr int kAppListHomeLaucherGesturesThreshold = 32;
// Quality of the shield background blur.
constexpr float kAppListBlurQuality = 0.25f;
// Set animation durations to 0 for testing.
static bool short_animations_for_testing;
......@@ -507,6 +510,8 @@ void AppListView::InitContents(int initial_apps_page) {
app_list_background_shield_mask_->layer());
app_list_background_shield_->layer()->SetBackgroundBlur(
AppListConfig::instance().blur_radius());
app_list_background_shield_->layer()->SetBackdropFilterQuality(
kAppListBlurQuality);
}
AddChildView(app_list_background_shield_);
app_list_main_view_ = new AppListMainView(delegate_, this);
......
......@@ -45,6 +45,7 @@ namespace {
constexpr int kShelfRoundedCornerRadius = 28;
constexpr int kShelfBlurRadius = 10;
constexpr float kShelfBlurQuality = 0.25f;
// Return the first or last focusable child of |root|.
views::View* FindFirstOrLastFocusableChild(views::View* root,
......@@ -198,6 +199,7 @@ void ShelfWidget::DelegateView::UpdateBackgroundBlur() {
opaque_background_.SetBackgroundBlur(should_blur_background ? kShelfBlurRadius
: 0);
opaque_background_.SetBackdropFilterQuality(kShelfBlurQuality);
background_is_currently_blurred_ = should_blur_background;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment