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

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

Issue 2263693003: Add palm suppression feature to EventConverterEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stylus
Patch Set: use touch major = max to recognize palms Created 4 years, 4 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/ozone/evdev/touch_event_converter_evdev.h
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.h b/ui/events/ozone/evdev/touch_event_converter_evdev.h
index ccb60d7c1331b13939b3300e0887498da2a365d8..9bef73eb437a001f1ed7acc29ec56665b39711fe 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev.h
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev.h
@@ -28,6 +28,7 @@ class PointF;
namespace ui {
class DeviceEventDispatcherEvdev;
+class PalmSuppressionFilter;
class TouchEvent;
class TouchNoiseFinder;
struct InProgressTouchEvdev;
@@ -45,10 +46,12 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
// EventConverterEvdev:
bool HasTouchscreen() const override;
+ bool HasPen() const override;
gfx::Size GetTouchscreenSize() const override;
int GetTouchPoints() const override;
void OnEnabled() override;
void OnDisabled() override;
+ void SetPalmSuppressionFilter(PalmSuppressionFilter* palm_filter) override;
void DumpTouchEventLog(const char* filename) override;
@@ -104,6 +107,9 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
// Device has multitouch capability.
bool has_mt_ = false;
+ // Device has pen capability.
+ bool has_pen_ = false;
+
// Use BTN_LEFT instead of BT_TOUCH.
bool quirk_left_mouse_button_ = false;
@@ -122,6 +128,9 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
// Number of touch points reported by driver
int touch_points_ = 0;
+ // Maximum value of touch major axis
+ int major_max_ = 0;
+
// Tracking id counter.
int next_tracking_id_ = 0;
@@ -140,6 +149,9 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
// Records the recent touch events. It is used to fill the feedback reports
TouchEventLogEvdev touch_evdev_debug_buffer_;
+ // Decides whether events should be dropped for palm suppression.
+ PalmSuppressionFilter* palm_filter_;
+
DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev);
};

Powered by Google App Engine
This is Rietveld 408576698