| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 ui::SetIntProperty(xwindow, kInternalProp, kCARDINAL, internal); | 112 ui::SetIntProperty(xwindow, kInternalProp, kCARDINAL, internal); |
| 113 ui::SetIntProperty(xwindow, kRotationProp, kCARDINAL, xrandr_rotation); | 113 ui::SetIntProperty(xwindow, kRotationProp, kCARDINAL, xrandr_rotation); |
| 114 ui::SetIntProperty(xwindow, | 114 ui::SetIntProperty(xwindow, |
| 115 kScaleFactorProp, | 115 kScaleFactorProp, |
| 116 kCARDINAL, | 116 kCARDINAL, |
| 117 100 * display.device_scale_factor()); | 117 100 * display.device_scale_factor()); |
| 118 #endif | 118 #endif |
| 119 scoped_ptr<aura::RootWindowTransformer> transformer( | 119 scoped_ptr<aura::RootWindowTransformer> transformer( |
| 120 internal::CreateRootWindowTransformerForDisplay(root->window(), display)); | 120 internal::CreateRootWindowTransformerForDisplay(root->window(), display)); |
| 121 root->host()->SetRootWindowTransformer(transformer.Pass()); | 121 root->host()->SetRootWindowTransformer(transformer.Pass()); |
| 122 |
| 123 internal::DisplayMode mode; |
| 124 if (GetDisplayManager()->GetSelectedModeForDisplayId(display.id(), &mode)) { |
| 125 root->host()->compositor()->OnUpdateVSyncParameters( |
| 126 base::TimeTicks(), |
| 127 base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond / |
| 128 mode.refresh_rate), |
| 129 true); |
| 130 } |
| 122 } | 131 } |
| 123 | 132 |
| 124 } // namespace | 133 } // namespace |
| 125 | 134 |
| 126 namespace internal { | 135 namespace internal { |
| 127 | 136 |
| 128 // A utility class to store/restore focused/active window | 137 // A utility class to store/restore focused/active window |
| 129 // when the display configuration has changed. | 138 // when the display configuration has changed. |
| 130 class FocusActivationStore { | 139 class FocusActivationStore { |
| 131 public: | 140 public: |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 std::string name = | 744 std::string name = |
| 736 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; | 745 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; |
| 737 gfx::AcceleratedWidget xwindow = | 746 gfx::AcceleratedWidget xwindow = |
| 738 root_windows[i]->GetDispatcher()->host()->GetAcceleratedWidget(); | 747 root_windows[i]->GetDispatcher()->host()->GetAcceleratedWidget(); |
| 739 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); | 748 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); |
| 740 } | 749 } |
| 741 #endif | 750 #endif |
| 742 } | 751 } |
| 743 | 752 |
| 744 } // namespace ash | 753 } // namespace ash |
| OLD | NEW |