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