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

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

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 #endif 78 #endif
79 79
80 gfx::Transform ctm; 80 gfx::Transform ctm;
81 81
82 if (current_size.IsEmpty() || touch_native_size.IsEmpty() || 82 if (current_size.IsEmpty() || touch_native_size.IsEmpty() ||
83 touch_area.IsEmpty() || touchscreen.id == ui::InputDevice::kInvalidId) 83 touch_area.IsEmpty() || touchscreen.id == ui::InputDevice::kInvalidId)
84 return ctm; 84 return ctm;
85 85
86 #if defined(USE_OZONE) 86 #if defined(USE_OZONE)
87 // Translate the touch so that it falls within the display bounds. 87 // Translate the touch so that it falls within the display bounds.
88 ctm.Translate(display.bounds_in_native().x(), 88 ctm.Translate(display.bounds_in_native().x(), display.bounds_in_native().y());
89 display.bounds_in_native().y());
90 #endif 89 #endif
91 90
92 // Take care of panel fitting only if supported. Panel fitting is emulated in 91 // Take care of panel fitting only if supported. Panel fitting is emulated in
93 // software mirroring mode (display != touch_display). 92 // software mirroring mode (display != touch_display).
94 // If panel fitting is enabled then the aspect ratio is preserved and the 93 // If panel fitting is enabled then the aspect ratio is preserved and the
95 // display is scaled acordingly. In this case blank regions would be present 94 // display is scaled acordingly. In this case blank regions would be present
96 // in order to center the displayed area. 95 // in order to center the displayed area.
97 if (display.is_aspect_preserving_scaling() || 96 if (display.is_aspect_preserving_scaling() ||
98 display.id() != touch_display.id()) { 97 display.id() != touch_display.id()) {
99 float touch_native_ar = 98 float touch_native_ar =
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 219
221 void TouchTransformerController::OnDisplaysInitialized() { 220 void TouchTransformerController::OnDisplaysInitialized() {
222 UpdateTouchTransformer(); 221 UpdateTouchTransformer();
223 } 222 }
224 223
225 void TouchTransformerController::OnDisplayConfigurationChanged() { 224 void TouchTransformerController::OnDisplayConfigurationChanged() {
226 UpdateTouchTransformer(); 225 UpdateTouchTransformer();
227 } 226 }
228 227
229 } // namespace ash 228 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_observer_hud_unittest.cc ('k') | ash/touch/touch_transformer_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698