OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/touch/touch_transformer_controller.h" | 5 #include "ash/touch/touch_transformer_controller.h" |
6 | 6 |
7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
9 #include "ash/host/ash_window_tree_host.h" | 9 #include "ash/host/ash_window_tree_host.h" |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 } | 197 } |
198 | 198 |
199 if (display_state == ui::MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED) { | 199 if (display_state == ui::MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED) { |
200 // In extended but software mirroring mode, ther is only one X root window | 200 // In extended but software mirroring mode, ther is only one X root window |
201 // that associates with both displays. | 201 // that associates with both displays. |
202 if (GetDisplayManager()->software_mirroring_enabled()) { | 202 if (GetDisplayManager()->software_mirroring_enabled()) { |
203 aura::Window* root = display_controller->GetPrimaryRootWindow(); | 203 aura::Window* root = display_controller->GetPrimaryRootWindow(); |
204 RootWindowController::ForWindow(root)->ash_host()->UpdateDisplayID( | 204 RootWindowController::ForWindow(root)->ash_host()->UpdateDisplayID( |
205 display1_id, display2_id); | 205 display1_id, display2_id); |
206 DisplayInfo source_display = | 206 DisplayInfo source_display = |
207 gfx::Display::InternalDisplayId() == display1_id ? | 207 display_controller->GetPrimaryDisplayId() == display1_id ? display1 |
208 display1 : display2; | 208 : display2; |
oshima
2015/02/27 22:13:54
primary display can be external on the device that
pkotwicz
2015/03/01 01:51:14
That is true. However, in software mirror mode, if
pkotwicz
2015/03/01 03:32:50
Even if the internal display is not the primary di
| |
209 // Mapping from framebuffer size to the source display's native | 209 // Mapping from framebuffer size to the source display's native |
210 // resolution. | 210 // resolution. |
211 device_manager->UpdateTouchInfoForDisplay( | 211 device_manager->UpdateTouchInfoForDisplay( |
212 display1_id, display1.touch_device_id(), | 212 display1_id, display1.touch_device_id(), |
213 GetTouchTransform(source_display, display1, | 213 GetTouchTransform(source_display, display1, |
214 FindTouchscreenById(display1.touch_device_id()), | 214 FindTouchscreenById(display1.touch_device_id()), |
215 fb_size)); | 215 fb_size)); |
216 device_manager->UpdateTouchInfoForDisplay( | 216 device_manager->UpdateTouchInfoForDisplay( |
217 display2_id, display2.touch_device_id(), | 217 display2_id, display2.touch_device_id(), |
218 GetTouchTransform(source_display, display2, | 218 GetTouchTransform(source_display, display2, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
258 | 258 |
259 void TouchTransformerController::OnDisplaysInitialized() { | 259 void TouchTransformerController::OnDisplaysInitialized() { |
260 UpdateTouchTransformer(); | 260 UpdateTouchTransformer(); |
261 } | 261 } |
262 | 262 |
263 void TouchTransformerController::OnDisplayConfigurationChanged() { | 263 void TouchTransformerController::OnDisplayConfigurationChanged() { |
264 UpdateTouchTransformer(); | 264 UpdateTouchTransformer(); |
265 } | 265 } |
266 | 266 |
267 } // namespace ash | 267 } // namespace ash |
OLD | NEW |