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_manager.h" | 7 #include "ash/display/display_manager.h" |
8 #include "ash/display/window_tree_host_manager.h" | 8 #include "ash/display/window_tree_host_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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 display1_id = list[0]; | 179 display1_id = list[0]; |
180 display2_id = list[1]; | 180 display2_id = list[1]; |
181 DCHECK(display1_id != display::Display::kInvalidDisplayID && | 181 DCHECK(display1_id != display::Display::kInvalidDisplayID && |
182 display2_id != display::Display::kInvalidDisplayID); | 182 display2_id != display::Display::kInvalidDisplayID); |
183 display1 = display_manager->GetDisplayInfo(display1_id); | 183 display1 = display_manager->GetDisplayInfo(display1_id); |
184 display2 = display_manager->GetDisplayInfo(display2_id); | 184 display2 = display_manager->GetDisplayInfo(display2_id); |
185 UpdateTouchRadius(display1); | 185 UpdateTouchRadius(display1); |
186 UpdateTouchRadius(display2); | 186 UpdateTouchRadius(display2); |
187 } | 187 } |
188 | 188 |
189 gfx::Size fb_size = | |
190 Shell::GetInstance()->display_configurator()->framebuffer_size(); | |
191 | |
192 if (display_manager->IsInMirrorMode()) { | 189 if (display_manager->IsInMirrorMode()) { |
193 int64_t primary_display_id = | 190 int64_t primary_display_id = |
194 window_tree_host_manager->GetPrimaryDisplayId(); | 191 window_tree_host_manager->GetPrimaryDisplayId(); |
195 if (GetDisplayManager()->SoftwareMirroringEnabled()) { | 192 if (GetDisplayManager()->SoftwareMirroringEnabled()) { |
196 // In extended but software mirroring mode, there is a WindowTreeHost for | 193 // In extended but software mirroring mode, there is a WindowTreeHost for |
197 // each display, but all touches are forwarded to the primary root | 194 // each display, but all touches are forwarded to the primary root |
198 // window's WindowTreeHost. | 195 // window's WindowTreeHost. |
199 DisplayInfo target_display = | 196 DisplayInfo target_display = |
200 primary_display_id == display1_id ? display1 : display2; | 197 primary_display_id == display1_id ? display1 : display2; |
201 UpdateTouchTransform(target_display.id(), display1, target_display); | 198 UpdateTouchTransform(target_display.id(), display1, target_display); |
(...skipping 21 matching lines...) Expand all Loading... |
223 | 220 |
224 void TouchTransformerController::OnDisplaysInitialized() { | 221 void TouchTransformerController::OnDisplaysInitialized() { |
225 UpdateTouchTransformer(); | 222 UpdateTouchTransformer(); |
226 } | 223 } |
227 | 224 |
228 void TouchTransformerController::OnDisplayConfigurationChanged() { | 225 void TouchTransformerController::OnDisplayConfigurationChanged() { |
229 UpdateTouchTransformer(); | 226 UpdateTouchTransformer(); |
230 } | 227 } |
231 | 228 |
232 } // namespace ash | 229 } // namespace ash |
OLD | NEW |