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

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

Issue 2557163002: Implements computation of touch calibration transform using user provided data (Closed)
Patch Set: Resolving comments Created 4 years 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 #ifndef ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ 5 #ifndef ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_
6 #define ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ 6 #define ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 17 matching lines...) Expand all
28 ~TouchTransformerController() override; 28 ~TouchTransformerController() override;
29 29
30 // Updates the TouchTransformer for touch device and pushes the new 30 // Updates the TouchTransformer for touch device and pushes the new
31 // TouchTransformer into device manager. 31 // TouchTransformer into device manager.
32 void UpdateTouchTransformer() const; 32 void UpdateTouchTransformer() const;
33 33
34 // WindowTreeHostManager::Observer: 34 // WindowTreeHostManager::Observer:
35 void OnDisplaysInitialized() override; 35 void OnDisplaysInitialized() override;
36 void OnDisplayConfigurationChanged() override; 36 void OnDisplayConfigurationChanged() override;
37 37
38 // During touch calibration we remove any kind of transform that is being
kylechar 2016/12/22 16:56:00 You removed this from the cc file but not h file.
malaykeshav 2016/12/22 19:48:50 Done.
39 // applied to the touch input's location.
40 void SetForCalibration(bool is_calibrating);
41
38 private: 42 private:
39 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest, 43 friend class TouchTransformerControllerTest;
40 MirrorModeLetterboxing);
41 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest,
42 MirrorModePillarboxing);
43 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest, SoftwareMirrorMode);
44 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest, ExtendedMode);
45 FRIEND_TEST_ALL_PREFIXES(TouchTransformerControllerTest, TouchRadiusScale);
46 44
47 // Returns a transform that will be used to change an event's location from 45 // Returns a transform that will be used to change an event's location from
48 // the touchscreen's coordinate system into |display|'s coordinate system. 46 // the touchscreen's coordinate system into |display|'s coordinate system.
49 // The transform is also responsible for properly scaling the display if the 47 // The transform is also responsible for properly scaling the display if the
50 // display supports panel fitting. 48 // display supports panel fitting.
51 // 49 //
52 // On X11 events are reported in framebuffer coordinate space, so the 50 // On X11 events are reported in framebuffer coordinate space, so the
53 // |framebuffer_size| is used for scaling. 51 // |framebuffer_size| is used for scaling.
54 // On Ozone events are reported in the touchscreen's resolution, so 52 // On Ozone events are reported in the touchscreen's resolution, so
55 // |touch_display| is used to determine the size and scale the event. 53 // |touch_display| is used to determine the size and scale the event.
(...skipping 19 matching lines...) Expand all
75 // touch events. 73 // touch events.
76 // |touch_display| is the physical display that has the touchscreen 74 // |touch_display| is the physical display that has the touchscreen
77 // from which the events arrive. 75 // from which the events arrive.
78 // |target_display| provides the dimensions to which the touch event will be 76 // |target_display| provides the dimensions to which the touch event will be
79 // transformed. 77 // transformed.
80 void UpdateTouchTransform( 78 void UpdateTouchTransform(
81 int64_t target_display_id, 79 int64_t target_display_id,
82 const display::ManagedDisplayInfo& touch_display, 80 const display::ManagedDisplayInfo& touch_display,
83 const display::ManagedDisplayInfo& target_display) const; 81 const display::ManagedDisplayInfo& target_display) const;
84 82
83 bool is_calibrating_ = false;
kylechar 2016/12/22 16:56:00 Likewise, you seem to have removed the usage of th
malaykeshav 2016/12/22 19:48:50 Done
84
85 DISALLOW_COPY_AND_ASSIGN(TouchTransformerController); 85 DISALLOW_COPY_AND_ASSIGN(TouchTransformerController);
86 }; 86 };
87 87
88 } // namespace ash 88 } // namespace ash
89 89
90 #endif // ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_ 90 #endif // ASH_TOUCH_TOUCH_TRANSFORMER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698