OLD | NEW |
---|---|
(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_ | |
OLD | NEW |