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

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to