0

Use black background for empty wallpaper

In Kiosk mode and Managed Guest Session, there is no default wallpaper
to be set, causing the wallpaper to be empty. This causes the partial
swap feature to leave behind artifacts when moving windows and mouse
cursor around.

Bug: b:383440913
Change-Id: Ibeb65f2f723a94a18d1c007c70db1ed776d06b2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6230464
Commit-Queue: Vincent Chiang <vincentchiang@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Zoraiz Naeem <zoraiznaeem@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1416555}
This commit is contained in:
Vincent Chiang
2025-02-05 18:31:51 -08:00
committed by Chromium LUCI CQ
parent 26ac90c274
commit 9880be2361

@ -48,6 +48,9 @@ void WallpaperBaseView::OnPaint(gfx::Canvas* canvas) {
WallpaperLayout layout = controller->GetWallpaperLayout();
if (wallpaper.isNull()) {
// Paint the canvas black if there is no wallpaper present.
// See crbug.com/383440913 for why this is necessary.
canvas->DrawColor(SK_ColorBLACK);
return;
}