Commit 9d3e5061 authored by Alex Newcomer's avatar Alex Newcomer Committed by Commit Bot

cros: Added background blur for the launcher.

Background blur is enabled behind the appropriate flag.
The flag will be set for either certain devices or all devices
based on blur performance.
The flag will eventually be removed when blur is acceptable for
all devices.

Bug: 739405
Change-Id: If03bbc7bcfbeb5f8609def3b582a05113ef1571e
Reviewed-on: https://chromium-review.googlesource.com/592289
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491091}
parent bd1f3d6e
...@@ -36,6 +36,7 @@ APP_LIST_EXPORT extern const base::Feature kEnablePlayStoreAppSearch; ...@@ -36,6 +36,7 @@ APP_LIST_EXPORT extern const base::Feature kEnablePlayStoreAppSearch;
bool APP_LIST_EXPORT IsAnswerCardEnabled(); bool APP_LIST_EXPORT IsAnswerCardEnabled();
bool APP_LIST_EXPORT IsAnswerCardDarkRunEnabled(); bool APP_LIST_EXPORT IsAnswerCardDarkRunEnabled();
bool APP_LIST_EXPORT IsBackgroundBlurEnabled();
bool APP_LIST_EXPORT IsFullscreenAppListEnabled(); bool APP_LIST_EXPORT IsFullscreenAppListEnabled();
bool APP_LIST_EXPORT IsTouchFriendlySearchResultsPageEnabled(); bool APP_LIST_EXPORT IsTouchFriendlySearchResultsPageEnabled();
bool APP_LIST_EXPORT IsPlayStoreAppSearchEnabled(); bool APP_LIST_EXPORT IsPlayStoreAppSearchEnabled();
......
...@@ -76,6 +76,9 @@ constexpr int kAppListMinScrollToSwitchStates = 20; ...@@ -76,6 +76,9 @@ constexpr int kAppListMinScrollToSwitchStates = 20;
// the |app_list_state_|. // the |app_list_state_|.
constexpr int kAppListBezelMargin = 50; constexpr int kAppListBezelMargin = 50;
// The blur radius of the app list background.
constexpr int kAppListBlurRadius = 20;
// The vertical position for the appearing animation of the speech UI. // The vertical position for the appearing animation of the speech UI.
constexpr float kSpeechUIAppearingPosition = 12; constexpr float kSpeechUIAppearingPosition = 12;
...@@ -337,12 +340,16 @@ void AppListView::InitContents(gfx::NativeView parent, int initial_apps_page) { ...@@ -337,12 +340,16 @@ void AppListView::InitContents(gfx::NativeView parent, int initial_apps_page) {
"440224, 441028 AppListView::InitContents")); "440224, 441028 AppListView::InitContents"));
if (is_fullscreen_app_list_enabled_) { if (is_fullscreen_app_list_enabled_) {
// The shield view that colors the background of the app list and makes it // The shield view that colors/blurs the background of the app list and
// transparent. // makes it transparent.
app_list_background_shield_ = new views::View; app_list_background_shield_ = new views::View;
app_list_background_shield_->SetPaintToLayer(ui::LAYER_SOLID_COLOR); app_list_background_shield_->SetPaintToLayer(ui::LAYER_SOLID_COLOR);
app_list_background_shield_->layer()->SetColor(SK_ColorBLACK); app_list_background_shield_->layer()->SetColor(SK_ColorBLACK);
app_list_background_shield_->layer()->SetOpacity(kAppListOpacity); app_list_background_shield_->layer()->SetOpacity(kAppListOpacity);
if (features::IsBackgroundBlurEnabled()) {
app_list_background_shield_->layer()->SetBackgroundBlur(
kAppListBlurRadius);
}
AddChildView(app_list_background_shield_); AddChildView(app_list_background_shield_);
} }
app_list_main_view_ = new AppListMainView(delegate_, this); app_list_main_view_ = new AppListMainView(delegate_, this);
......
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