[RFC] xserver: Masked valuators, DIDs, and ABS_MT_SLOT
Henrik Rydberg
rydberg at bitmath.org
Fri Jul 2 01:27:39 PDT 2010
Chase Douglas wrote:
> The following changes since commit a71dbc03e65cf7b0654a6eca93ce0bf6a1711ffa:
>
> Bump to version 1.8.99.904 (1.9 RC4) (2010-07-01 08:27:05 -0400)
>
> are available in the git repository at:
> git://kernel.ubuntu.com/cndougla/xserver.git master
>
> Chase Douglas (3):
> Add extra functions for masked valuator input API
> Add internal direct input device handling
> Add atom name for ABS_MT_SLOT properties
>
> Xi/exevents.c | 5 +-
> Xi/xiproperty.c | 1 +
> dix/devices.c | 33 +++++-
> dix/eventconvert.c | 4 +
> dix/events.c | 19 ++-
> dix/getevents.c | 282 ++++++++++++++++++++++++++++------------
The rangeToMask allocates memory in the inner event loop...
The whole mapping construction seems a bit backwards. If unused valuators are
never referenced, there is no need to do all those extra copies. As a side effect,
*EventsM(events, pDev, type, key_code, mask, num_valuators, all_valuators);
could be implemented like
*EventsM(events, pDev, type, key_code, mask, num_valuators + first_valuator,
valuators - first_valuator);
The bit mask is memory efficient, why not allocate in on the stack? It would
certainly be a lot faster.
Thanks,
Henrik
> hw/xfree86/common/xf86Xinput.c | 158 ++++++++++++++++++++++
> hw/xfree86/common/xf86Xinput.h | 10 ++
> include/input.h | 27 ++++
> include/inputstr.h | 1 +
> include/xserver-properties.h | 1 +
> mi/mieq.c | 4 +-
> 12 files changed, 452 insertions(+), 93 deletions(-)
More information about the xorg-devel
mailing list