Commit f0503a2f authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

wallpaper: Do not dim in overview if in tablet mode.

Dimming is already applied in OnPaint so the filter is not needed,
requested by UX.

Test: manual
Bug: 1012042
Change-Id: I2467e4a927c6786f1289e7417bea8bb05716b14f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846473
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704218}
parent 144ee079
......@@ -10,6 +10,7 @@
#include "ash/shell.h"
#include "ash/wallpaper/wallpaper_controller_impl.h"
#include "ash/wallpaper/wallpaper_widget_controller.h"
#include "ash/wm/tablet_mode/tablet_mode_controller.h"
#include "cc/paint/render_surface_filters.h"
#include "ui/aura/window.h"
#include "ui/display/display.h"
......@@ -133,8 +134,14 @@ void WallpaperView::DrawWallpaper(const gfx::ImageSkia& wallpaper,
// Create the blur and brightness filter to apply to the downsampled image.
cc::PaintFlags filter_flags;
cc::FilterOperations operations;
// In tablet mode, the wallpaper already has a color filter applied in
// |OnPaint| so we don't need to darken here.
// TODO(crbug.com/944152): Merge this with the color filter in
// WallpaperBaseView.
if (!Shell::Get()->tablet_mode_controller()->InTabletMode()) {
operations.Append(
cc::FilterOperation::CreateBrightnessFilter(repaint_opacity_));
}
operations.Append(cc::FilterOperation::CreateBlurFilter(
blur, SkBlurImageFilter::kClamp_TileMode));
sk_sp<cc::PaintFilter> filter = cc::RenderSurfaceFilters::BuildImageFilter(
......
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