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

Unified Diff: ui/events/x/device_data_manager.h

Issue 191223007: Move touch CTM from X into Chrome (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: move CTM update code into a separate file ash/touch/touch_ctm_controller.cc Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/x/device_data_manager.h
diff --git a/ui/events/x/device_data_manager.h b/ui/events/x/device_data_manager.h
index aff064935718000d97f23a866178e0629fe4e810..d0e8f6a2203c5fb1ca12c9bc4bb723ccaa62f5ef 100644
--- a/ui/events/x/device_data_manager.h
+++ b/ui/events/x/device_data_manager.h
@@ -22,6 +22,7 @@
#include "base/event_types.h"
#include "ui/events/event_constants.h"
#include "ui/events/events_base_export.h"
+#include "ui/events/touch_ctm.h"
#include "ui/gfx/x/x11_atom_cache.h"
template <typename T> struct DefaultSingletonTraits;
@@ -215,6 +216,16 @@ class EVENTS_BASE_EXPORT DeviceDataManager {
double* min,
double* max);
+ void ClearTouchCTM();
sadrul 2014/03/15 19:32:51 Use something more descriptive than CTM
Yufeng Shen (Slow to review) 2014/04/29 20:34:18 renamed to TouchTransformer.
+ void SetTouchCTM(int touch_device_id,
+ const TouchCTM& touch_ctm);
+ void ApplyTouchCTM(int touch_device_id, float* x, float* y);
+
+ void ClearTouchDeviceToDisplayMap();
sadrul 2014/03/15 19:32:51 We should have one 'Clear<...>' instead of two sep
Yufeng Shen (Slow to review) 2014/04/29 20:34:18 Done.
+ void MapTouchDeviceToDisplay(int touch_device_id, int64 display_id);
+ int64 GetDisplayForTouchDevice(int touch_device_id);
+
+
// Sets up relevant valuator informations for device ids in the device lists.
// This function is only for test purpose. It does not query the X server for
// the actual device info, but rather inits the relevant valuator structures
@@ -292,6 +303,11 @@ class EVENTS_BASE_EXPORT DeviceDataManager {
unsigned char button_map_[256];
int button_map_count_;
+ // Table to keep track of which display id is mapped to which touch device.
+ int64 touch_device_to_display_map_[kMaxDeviceNum];
+ // Index table to find the TouchCTM for a touch device.
+ TouchCTM touch_device_ctm_map_[kMaxDeviceNum];
+
DISALLOW_COPY_AND_ASSIGN(DeviceDataManager);
};

Powered by Google App Engine
This is Rietveld 408576698