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

Side by Side Diff: ui/events/ozone/evdev/touch_event_converter_evdev.cc

Issue 2692923009: ozone: Selectively enable touch debug buffer (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/ozone/evdev/touch_event_converter_evdev.h" 5 #include "ui/events/ozone/evdev/touch_event_converter_evdev.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <linux/input.h> 9 #include <linux/input.h>
10 #include <poll.h> 10 #include <poll.h>
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 touch_logging_enabled_ = enabled; 286 touch_logging_enabled_ = enabled;
287 } 287 }
288 288
289 void TouchEventConverterEvdev::SetPalmSuppressionCallback( 289 void TouchEventConverterEvdev::SetPalmSuppressionCallback(
290 const base::Callback<void(bool)>& callback) { 290 const base::Callback<void(bool)>& callback) {
291 enable_palm_suppression_callback_ = callback; 291 enable_palm_suppression_callback_ = callback;
292 } 292 }
293 293
294 void TouchEventConverterEvdev::ProcessMultitouchEvent( 294 void TouchEventConverterEvdev::ProcessMultitouchEvent(
295 const input_event& input) { 295 const input_event& input) {
296 if (touch_logging_enabled_) 296 if (touch_logging_enabled_ && !has_pen_)
297 touch_evdev_debug_buffer_.ProcessEvent(current_slot_, &input); 297 touch_evdev_debug_buffer_.ProcessEvent(current_slot_, &input);
298 298
299 if (input.type == EV_SYN) { 299 if (input.type == EV_SYN) {
300 ProcessSyn(input); 300 ProcessSyn(input);
301 } else if (dropped_events_) { 301 } else if (dropped_events_) {
302 // Do nothing. This branch indicates we have lost sync with the driver. 302 // Do nothing. This branch indicates we have lost sync with the driver.
303 } else if (input.type == EV_ABS) { 303 } else if (input.type == EV_ABS) {
304 if (events_.size() <= current_slot_) { 304 if (events_.size() <= current_slot_) {
305 LOG(ERROR) << "current_slot_ (" << current_slot_ 305 LOG(ERROR) << "current_slot_ (" << current_slot_
306 << ") >= events_.size() (" << events_.size() << ")"; 306 << ") >= events_.size() (" << events_.size() << ")";
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 if (pressure_max_ - pressure_min_) 556 if (pressure_max_ - pressure_min_)
557 pressure /= pressure_max_ - pressure_min_; 557 pressure /= pressure_max_ - pressure_min_;
558 return pressure; 558 return pressure;
559 } 559 }
560 560
561 int TouchEventConverterEvdev::NextTrackingId() { 561 int TouchEventConverterEvdev::NextTrackingId() {
562 return next_tracking_id_++ & kMaxTrackingId; 562 return next_tracking_id_++ & kMaxTrackingId;
563 } 563 }
564 564
565 } // namespace ui 565 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698