Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Side by Side Diff: ash/touch/touch_transformer_controller.cc

Issue 2051343002: Make various gfx classes more amenable to use as compile-time constants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile and test fixes Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698