[RFC] xserver: Masked valuators, DIDs, and ABS_MT_SLOT

Chase Douglas chase.douglas at canonical.com
Fri Jul 2 06:14:10 PDT 2010


On Fri, 2010-07-02 at 15:02 +0200, Henrik Rydberg wrote:
> Hi Chase,
> [...]
> >> 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);

Actually, at first I didn't notice that your last parameter here was
"valuators '-' first_valuator", I thought you had a '+' in there, so it
didn't make any sense to me. I think we can use this approach and not
have to change the API.

Good thinking!

-- Chase



More information about the xorg-devel mailing list