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

Side by Side Diff: ui/events/ozone/evdev/touch_noise/touch_noise_filter.h

Issue 991533002: Port Chromium OS touch noise filtering to Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_EVENTS_OZONE_EVDEV_TOUCH_NOISE_TOUCH_NOISE_FILTER_H_
6 #define UI_EVENTS_OZONE_EVDEV_TOUCH_NOISE_TOUCH_NOISE_FILTER_H_
7
8 #include "base/time/time.h"
9 #include "ui/gfx/geometry/point_f.h"
10
11 namespace ui {
12
13 class TouchNoiseFilter {
14 public:
15 static const int kNumSlots = 64;
flackr 2015/03/10 05:23:40 Should probably use the same number of slots as in
pkotwicz 2015/03/13 03:53:16 I have made the code use the same number of slots
16
17 struct Finger {
18 Finger() : tracking_id(-1), canceled(false) {}
19 ~Finger() {}
20
21 gfx::PointF location;
22 int tracking_id;
23 bool canceled;
24 };
25
26 struct Frame {
27 base::TimeDelta timestamp;
28 Finger fingers[kNumSlots];
29 };
30
31 virtual ~TouchNoiseFilter() {}
32 virtual void FilterFrame(Frame* previous, Frame* current) = 0;
33 };
34
35 } // namespace ui
36
37 #endif // UI_EVENTS_OZONE_EVDEV_TOUCH_NOISE_TOUCH_NOISE_FILTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698