| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 CreateRootWindowTransformerForDisplay(host->window(), display)); | 146 CreateRootWindowTransformerForDisplay(host->window(), display)); |
| 147 ash_host->SetRootWindowTransformer(transformer.Pass()); | 147 ash_host->SetRootWindowTransformer(transformer.Pass()); |
| 148 | 148 |
| 149 DisplayMode mode = | 149 DisplayMode mode = |
| 150 GetDisplayManager()->GetActiveModeForDisplayId(display.id()); | 150 GetDisplayManager()->GetActiveModeForDisplayId(display.id()); |
| 151 if (mode.refresh_rate > 0.0f) { | 151 if (mode.refresh_rate > 0.0f) { |
| 152 host->compositor()->vsync_manager()->SetAuthoritativeVSyncInterval( | 152 host->compositor()->vsync_manager()->SetAuthoritativeVSyncInterval( |
| 153 base::TimeDelta::FromMicroseconds( | 153 base::TimeDelta::FromMicroseconds( |
| 154 base::Time::kMicrosecondsPerSecond / mode.refresh_rate)); | 154 base::Time::kMicrosecondsPerSecond / mode.refresh_rate)); |
| 155 } | 155 } |
| 156 |
| 157 // Just movnig the display requires the full redraw. |
| 158 // chrome-os-partner:33558. |
| 159 host->compositor()->ScheduleFullRedraw(); |
| 156 } | 160 } |
| 157 | 161 |
| 158 void ClearDisplayPropertiesOnHost(AshWindowTreeHost* ash_host, | 162 void ClearDisplayPropertiesOnHost(AshWindowTreeHost* ash_host, |
| 159 const gfx::Display& display) { | 163 const gfx::Display& display) { |
| 160 #if defined(OS_CHROMEOS) && defined(USE_OZONE) | 164 #if defined(OS_CHROMEOS) && defined(USE_OZONE) |
| 161 aura::WindowTreeHost* host = ash_host->AsWindowTreeHost(); | 165 aura::WindowTreeHost* host = ash_host->AsWindowTreeHost(); |
| 162 ui::CursorController::GetInstance()->ClearCursorConfigForWindow( | 166 ui::CursorController::GetInstance()->ClearCursorConfigForWindow( |
| 163 host->GetAcceleratedWidget()); | 167 host->GetAcceleratedWidget()); |
| 164 #endif | 168 #endif |
| 165 } | 169 } |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 std::string name = | 810 std::string name = |
| 807 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; | 811 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; |
| 808 gfx::AcceleratedWidget xwindow = | 812 gfx::AcceleratedWidget xwindow = |
| 809 root_windows[i]->GetHost()->GetAcceleratedWidget(); | 813 root_windows[i]->GetHost()->GetAcceleratedWidget(); |
| 810 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); | 814 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); |
| 811 } | 815 } |
| 812 #endif | 816 #endif |
| 813 } | 817 } |
| 814 | 818 |
| 815 } // namespace ash | 819 } // namespace ash |
| OLD | NEW |