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

Side by Side Diff: ash/desktop_background/desktop_background_controller.cc

Issue 10823230: Brief white flickering when transitioning from boot splash to Chrome animation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use constant for color Created 8 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/desktop_background/desktop_background_controller.h" 5 #include "ash/desktop_background/desktop_background_controller.h"
6 6
7 #include "ash/desktop_background/desktop_background_view.h" 7 #include "ash/desktop_background/desktop_background_view.h"
8 #include "ash/desktop_background/desktop_background_widget_controller.h" 8 #include "ash/desktop_background/desktop_background_widget_controller.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_factory.h" 10 #include "ash/shell_factory.h"
(...skipping 10 matching lines...) Expand all
21 #include "ui/compositor/layer.h" 21 #include "ui/compositor/layer.h"
22 #include "ui/gfx/rect.h" 22 #include "ui/gfx/rect.h"
23 #include "ui/gfx/image/image.h" 23 #include "ui/gfx/image/image.h"
24 #include "ui/views/widget/widget.h" 24 #include "ui/views/widget/widget.h"
25 25
26 namespace ash { 26 namespace ash {
27 namespace { 27 namespace {
28 28
29 const int kSmallWallpaperMaximalWidth = 1366; 29 const int kSmallWallpaperMaximalWidth = 1366;
30 const int kSmallWallpaperMaximalHeight = 800; 30 const int kSmallWallpaperMaximalHeight = 800;
31 const SkColor kTransparentColor = SkColorSetARGB(0x00, 0x00, 0x00, 0x00);
31 32
32 internal::RootWindowLayoutManager* GetRootWindowLayoutManager( 33 internal::RootWindowLayoutManager* GetRootWindowLayoutManager(
33 aura::RootWindow* root_window) { 34 aura::RootWindow* root_window) {
34 return static_cast<internal::RootWindowLayoutManager*>( 35 return static_cast<internal::RootWindowLayoutManager*>(
35 root_window->layout_manager()); 36 root_window->layout_manager());
36 } 37 }
37 } // namespace 38 } // namespace
38 39
39 // Stores the current wallpaper data. 40 // Stores the current wallpaper data.
40 struct DesktopBackgroundController::WallpaperData { 41 struct DesktopBackgroundController::WallpaperData {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 const int index_; 97 const int index_;
97 98
98 const WallpaperResolution resolution_; 99 const WallpaperResolution resolution_;
99 100
100 DISALLOW_COPY_AND_ASSIGN(WallpaperOperation); 101 DISALLOW_COPY_AND_ASSIGN(WallpaperOperation);
101 }; 102 };
102 103
103 DesktopBackgroundController::DesktopBackgroundController() 104 DesktopBackgroundController::DesktopBackgroundController()
104 : locked_(false), 105 : locked_(false),
105 desktop_background_mode_(BACKGROUND_SOLID_COLOR), 106 desktop_background_mode_(BACKGROUND_SOLID_COLOR),
106 background_color_(SK_ColorGRAY), 107 background_color_(kTransparentColor),
107 weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { 108 weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
108 InstallComponentForAllWindows(); 109 InstallComponentForAllWindows();
109 } 110 }
110 111
111 DesktopBackgroundController::~DesktopBackgroundController() { 112 DesktopBackgroundController::~DesktopBackgroundController() {
112 CancelPendingWallpaperOperation(); 113 CancelPendingWallpaperOperation();
113 } 114 }
114 115
115 gfx::ImageSkia DesktopBackgroundController::GetWallpaper() const { 116 gfx::ImageSkia DesktopBackgroundController::GetWallpaper() const {
116 if (current_wallpaper_.get()) 117 if (current_wallpaper_.get())
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 dst_container); 349 dst_container);
349 } 350 }
350 } 351 }
351 352
352 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) { 353 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) {
353 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer : 354 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer :
354 internal::kShellWindowId_DesktopBackgroundContainer; 355 internal::kShellWindowId_DesktopBackgroundContainer;
355 } 356 }
356 357
357 } // namespace ash 358 } // namespace ash
OLDNEW
« 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