OLD | NEW |
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/display/display_controller.h" | 5 #include "ash/display/display_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "ui/compositor/compositor.h" | 36 #include "ui/compositor/compositor.h" |
37 #include "ui/compositor/compositor_vsync_manager.h" | 37 #include "ui/compositor/compositor_vsync_manager.h" |
38 #include "ui/gfx/display.h" | 38 #include "ui/gfx/display.h" |
39 #include "ui/gfx/screen.h" | 39 #include "ui/gfx/screen.h" |
40 #include "ui/wm/public/activation_client.h" | 40 #include "ui/wm/public/activation_client.h" |
41 | 41 |
42 #if defined(OS_CHROMEOS) | 42 #if defined(OS_CHROMEOS) |
43 #include "ash/display/display_configurator_animation.h" | 43 #include "ash/display/display_configurator_animation.h" |
44 #include "base/sys_info.h" | 44 #include "base/sys_info.h" |
45 #include "base/time/time.h" | 45 #include "base/time/time.h" |
46 #endif // defined(OS_CHROMEOS) | |
47 | |
48 #if defined(USE_X11) | 46 #if defined(USE_X11) |
49 #include "ui/base/x/x11_util.h" | 47 #include "ui/base/x/x11_util.h" |
50 #include "ui/gfx/x/x11_types.h" | 48 #include "ui/gfx/x/x11_types.h" |
51 | 49 |
52 // Including this at the bottom to avoid other | 50 // Including this at the bottom to avoid other |
53 // potential conflict with chrome headers. | 51 // potential conflict with chrome headers. |
54 #include <X11/extensions/Xrandr.h> | 52 #include <X11/extensions/Xrandr.h> |
55 #undef RootWindow | 53 #undef RootWindow |
56 #endif // defined(USE_X11) | 54 #endif // defined(USE_X11) |
57 | 55 #endif // defined(OS_CHROMEOS) |
58 | 56 |
59 namespace ash { | 57 namespace ash { |
60 namespace { | 58 namespace { |
61 | 59 |
62 // Primary display stored in global object as it can be | 60 // Primary display stored in global object as it can be |
63 // accessed after Shell is deleted. A separate display instance is created | 61 // accessed after Shell is deleted. A separate display instance is created |
64 // during the shutdown instead of always keeping two display instances | 62 // during the shutdown instead of always keeping two display instances |
65 // (one here and another one in display_manager) in sync, which is error prone. | 63 // (one here and another one in display_manager) in sync, which is error prone. |
66 int64 primary_display_id = gfx::Display::kInvalidDisplayID; | 64 int64 primary_display_id = gfx::Display::kInvalidDisplayID; |
67 | 65 |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 std::string name = | 748 std::string name = |
751 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; | 749 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; |
752 gfx::AcceleratedWidget xwindow = | 750 gfx::AcceleratedWidget xwindow = |
753 root_windows[i]->GetHost()->GetAcceleratedWidget(); | 751 root_windows[i]->GetHost()->GetAcceleratedWidget(); |
754 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); | 752 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); |
755 } | 753 } |
756 #endif | 754 #endif |
757 } | 755 } |
758 | 756 |
759 } // namespace ash | 757 } // namespace ash |
OLD | NEW |