.orientation = DEFAULT_TOUCH_ORIENTATION
};
+ TRACE_BEGIN(evdev_flush_pending_event);
+
slot = device->mt.slot;
slot_data = &device->mt.slots[slot];
switch (device->pending_event) {
case EVDEV_NONE:
+ TRACE_END();
return;
case EVDEV_RELATIVE_MOTION:
dx_unaccel = device->rel.dx / ((double) device->dpi /
}
device->pending_event = EVDEV_NONE;
+ TRACE_END();
}
static enum evdev_key_type
{
enum evdev_key_type type;
+ TRACE_BEGIN(evdev_process_key);
+
/* ignore kernel key repeat */
- if (e->value == 2)
+ if (e->value == 2) {
+ TRACE_END();
return;
+ }
if (e->code == BTN_TOUCH) {
if (!device->is_mt)
evdev_process_touch_button(device, time, e->value);
+ TRACE_END();
return;
}
break;
case EVDEV_KEY_TYPE_KEY:
case EVDEV_KEY_TYPE_BUTTON:
- if (!hw_is_key_down(device, e->code))
+ if (!hw_is_key_down(device, e->code)) {
+ TRACE_END();
return;
+ }
}
}
LIBINPUT_BUTTON_STATE_RELEASED);
break;
}
+ TRACE_END();
}
static void
evdev_process_relative(struct evdev_device *device,
struct input_event *e, uint64_t time)
{
+ TRACE_BEGIN(evdev_process_relative);
switch (e->code) {
case REL_X:
if (device->pending_event != EVDEV_RELATIVE_MOTION)
0.0);
break;
}
+ TRACE_END();
}
static inline void
struct input_event *e,
uint64_t time)
{
+ TRACE_BEGIN(evdev_process_absolute);
if (device->is_mt) {
evdev_process_touch(device, e, time);
} else {
evdev_process_absolute_motion(device, e);
}
+ TRACE_END();
}
static inline bool
struct evdev_dispatch *dispatch = device->dispatch;
uint64_t time = e->time.tv_sec * 1000ULL + e->time.tv_usec / 1000;
+ TRACE_BEGIN(evdev_process_event);
+
dispatch->interface->process(dispatch, device, e, time);
+
+ TRACE_END();
}
static inline void
{
struct libinput_event_device_notify *added_device_event;
+ TRACE_BEGIN(notify_added_device);
+
added_device_event = zalloc(sizeof *added_device_event);
- if (!added_device_event)
+ if (!added_device_event) {
+ TRACE_END();
return;
+ }
post_base_event(device,
LIBINPUT_EVENT_DEVICE_ADDED,
&added_device_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_device_notify *removed_device_event;
+ TRACE_BEGIN(notify_removed_device);
+
removed_device_event = zalloc(sizeof *removed_device_event);
- if (!removed_device_event)
+ if (!removed_device_event) {
+ TRACE_END();
return;
+ }
post_base_event(device,
LIBINPUT_EVENT_DEVICE_REMOVED,
&removed_device_event->base);
+
+ TRACE_END();
}
void
struct libinput_event_keyboard *key_event;
uint32_t seat_key_count;
+ TRACE_BEGIN(keyboard_notify_key);
+
key_event = zalloc(sizeof *key_event);
- if (!key_event)
+ if (!key_event) {
+ TRACE_END();
return;
+ }
seat_key_count = update_seat_key_count(device->seat, key, state);
post_device_event(device, time,
LIBINPUT_EVENT_KEYBOARD_KEY,
&key_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_pointer *motion_event;
+ TRACE_BEGIN(pointer_notify_motion);
+
motion_event = zalloc(sizeof *motion_event);
- if (!motion_event)
+ if (!motion_event) {
+ TRACE_END();
return;
+ }
*motion_event = (struct libinput_event_pointer) {
.time = time,
post_device_event(device, time,
LIBINPUT_EVENT_POINTER_MOTION,
&motion_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_pointer *motion_absolute_event;
+ TRACE_BEGIN(pointer_notify_motion_absolute);
+
motion_absolute_event = zalloc(sizeof *motion_absolute_event);
- if (!motion_absolute_event)
+ if (!motion_absolute_event) {
+ TRACE_END();
return;
+ }
*motion_absolute_event = (struct libinput_event_pointer) {
.time = time,
post_device_event(device, time,
LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE,
&motion_absolute_event->base);
+
+ TRACE_END();
}
void
struct libinput_event_pointer *button_event;
int32_t seat_button_count;
+ TRACE_BEGIN(pointer_notify_button);
+
button_event = zalloc(sizeof *button_event);
- if (!button_event)
+ if (!button_event) {
+ TRACE_END();
return;
+ }
seat_button_count = update_seat_button_count(device->seat,
button,
post_device_event(device, time,
LIBINPUT_EVENT_POINTER_BUTTON,
&button_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_pointer *axis_event;
+ TRACE_BEGIN(pointer_notify_axis);
+
axis_event = zalloc(sizeof *axis_event);
- if (!axis_event)
+ if (!axis_event) {
+ TRACE_END();
return;
+ }
*axis_event = (struct libinput_event_pointer) {
.time = time,
post_device_event(device, time,
LIBINPUT_EVENT_POINTER_AXIS,
&axis_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_touch *touch_event;
+ TRACE_BEGIN(touch_notify_touch_down);
+
touch_event = zalloc(sizeof *touch_event);
- if (!touch_event)
+ if (!touch_event) {
+ TRACE_END();
return;
+ }
*touch_event = (struct libinput_event_touch) {
.time = time,
post_device_event(device, time,
LIBINPUT_EVENT_TOUCH_DOWN,
&touch_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_touch *touch_event;
+ TRACE_BEGIN(touch_notify_touch_motion);
+
touch_event = zalloc(sizeof *touch_event);
- if (!touch_event)
+ if (!touch_event) {
+ TRACE_END();
return;
+ }
*touch_event = (struct libinput_event_touch) {
.time = time,
post_device_event(device, time,
LIBINPUT_EVENT_TOUCH_MOTION,
&touch_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_touch *touch_event;
+ TRACE_BEGIN(touch_notify_touch_up);
+
touch_event = zalloc(sizeof *touch_event);
- if (!touch_event)
+ if (!touch_event) {
+ TRACE_END();
return;
+ }
*touch_event = (struct libinput_event_touch) {
.time = time,
post_device_event(device, time,
LIBINPUT_EVENT_TOUCH_UP,
&touch_event->base);
+
+ TRACE_END();
}
void
{
struct libinput_event_touch *touch_event;
+ TRACE_BEGIN(touch_notify_frame);
+
touch_event = zalloc(sizeof *touch_event);
- if (!touch_event)
+ if (!touch_event) {
+ TRACE_END();
return;
+ }
*touch_event = (struct libinput_event_touch) {
.time = time,
post_device_event(device, time,
LIBINPUT_EVENT_TOUCH_FRAME,
&touch_event->base);
+
+ TRACE_END();
}
static void