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

Unified Diff: ash/wallpaper/wallpaper_controller.cc

Issue 2875123002: Check internal display RootWindow before getting the compositor. (Closed)
Patch Set: Revert to patch 1 using Shell. Created 3 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/wallpaper/wallpaper_controller.cc
diff --git a/ash/wallpaper/wallpaper_controller.cc b/ash/wallpaper/wallpaper_controller.cc
index 2991f51db0545ad44fd7796927d02d8112a4ec9a..8ebe54a50af035d8f0498f9cb2f0365d70695a1b 100644
--- a/ash/wallpaper/wallpaper_controller.cc
+++ b/ash/wallpaper/wallpaper_controller.cc
@@ -416,14 +416,15 @@ bool WallpaperController::MoveToUnlockedContainer() {
void WallpaperController::GetInternalDisplayCompositorLock() {
if (display::Display::HasInternalDisplay()) {
- compositor_lock_ =
- Shell::Get()
- ->window_tree_host_manager()
- ->GetRootWindowForDisplayId(display::Display::InternalDisplayId())
- ->layer()
- ->GetCompositor()
- ->GetCompositorLock(this, base::TimeDelta::FromMilliseconds(
- kCompositorLockTimeoutMs));
+ aura::Window* root_window =
+ Shell::Get()->window_tree_host_manager()->GetRootWindowForDisplayId(
+ display::Display::InternalDisplayId());
+ if (root_window) {
+ compositor_lock_ =
+ root_window->layer()->GetCompositor()->GetCompositorLock(
+ this,
+ base::TimeDelta::FromMilliseconds(kCompositorLockTimeoutMs));
+ }
}
}
« 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