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

Unified Diff: ui/events/ozone/evdev/event_device_info.h

Issue 674523003: Reland of [Ozone] Properly initialize multitouch slot values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 2 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
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_device_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/event_device_info.h
diff --git a/ui/events/ozone/evdev/event_device_info.h b/ui/events/ozone/evdev/event_device_info.h
index 321711404d5c23c66cc8d347f1840e976b78bb60..adca89e09ce31c8b43dd23f5f2db442e1fed5266 100644
--- a/ui/events/ozone/evdev/event_device_info.h
+++ b/ui/events/ozone/evdev/event_device_info.h
@@ -8,10 +8,15 @@
#include <limits.h>
#include <linux/input.h>
+#include <vector>
+
#include "base/basictypes.h"
#include "ui/events/ozone/evdev/event_device_util.h"
#include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
+// ABS_MT_SLOT isn't valid options for EVIOCGMTSLOTS ioctl.
+#define EVDEV_ABS_MT_COUNT (ABS_MAX - ABS_MT_SLOT - 1)
+
namespace ui {
// Device information for Linux input devices
@@ -38,6 +43,7 @@ class EVENTS_OZONE_EVDEV_EXPORT EventDeviceInfo {
// Properties of absolute axes.
int32 GetAbsMinimum(unsigned int code) const;
int32 GetAbsMaximum(unsigned int code) const;
+ int32 GetSlotValue(unsigned int code, unsigned int slot) const;
// Check input device properties.
bool HasProp(unsigned int code) const;
@@ -53,6 +59,9 @@ class EVENTS_OZONE_EVDEV_EXPORT EventDeviceInfo {
bool IsMappedToScreen() const;
private:
+ // Return the slot vector in |slot_values_| for |code|.
+ const std::vector<int32_t>& GetMtSlotsForCode(int code) const;
+
unsigned long ev_bits_[EVDEV_BITS_TO_LONGS(EV_CNT)];
unsigned long key_bits_[EVDEV_BITS_TO_LONGS(KEY_CNT)];
unsigned long rel_bits_[EVDEV_BITS_TO_LONGS(REL_CNT)];
@@ -64,6 +73,9 @@ class EVENTS_OZONE_EVDEV_EXPORT EventDeviceInfo {
struct input_absinfo abs_info_[ABS_CNT];
+ // Store the values for the multi-touch properties for each slot.
+ std::vector<int32_t> slot_values_[EVDEV_ABS_MT_COUNT];
+
DISALLOW_COPY_AND_ASSIGN(EventDeviceInfo);
};
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_device_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698