Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: ash/desktop_background/desktop_background_view.cc

Issue 1996793002: Fill the canvas with black background before painting wallpaper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/desktop_background/desktop_background_view.cc
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc
index 04311087b32f677f6f7683bda9398d8ab094c045..8753409f3d2b7e7e2c62c8b032214c832df501e5 100644
--- a/ash/desktop_background/desktop_background_view.cc
+++ b/ash/desktop_background/desktop_background_view.cc
@@ -138,8 +138,11 @@ void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) {
gfx::ImageSkia wallpaper = controller->GetWallpaper();
WallpaperLayout wallpaper_layout = controller->GetWallpaperLayout();
+ // Wallpapers with png format could be partially transparent.
+ // Reset the canvas before rendering wallpaper.
xdai1 2016/05/19 23:27:55 Might be better to say "Fill the canvas with black
xiaoyinh(OOO Sep 11-29) 2016/05/20 00:06:12 Done.
+ canvas->FillRect(GetLocalBounds(), SK_ColorBLACK);
+
xdai1 2016/05/19 23:27:55 Move this part after if(wallpaper.isNull())...
xiaoyinh(OOO Sep 11-29) 2016/05/20 00:06:11 Discussed with xdai1@, this will remain as is.
if (wallpaper.isNull()) {
xdai1 2016/05/19 23:27:55 No brace please
xiaoyinh(OOO Sep 11-29) 2016/05/20 00:06:12 Done.
- canvas->FillRect(GetLocalBounds(), SK_ColorBLACK);
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698