[RFC XI 2.1 - inputproto] Various fixes in response to Peter Hutterer's review
Chase Douglas
chase.douglas at canonical.com
Fri Dec 3 06:48:08 PST 2010
On 12/03/2010 01:30 AM, Peter Hutterer wrote:
> On Thu, Dec 02, 2010 at 10:30:56AM -0500, Chase Douglas wrote:
>> On 12/01/2010 04:27 PM, Daniel Stone wrote:
>>> On Fri, Nov 19, 2010 at 01:52:39PM -0500, Chase Douglas wrote:
>>>> A touch event is not delivered according to the device hierarchy. All touch
>>>> -events are sent only through their originating slave devices.
>>>> +events are sent only through their originating slave devices. However,
>>>> +dependent touch devices will only emit touch events if they are attached to a
>>>> +master device. This is due to the touch delivery being dependent on the
>>>> +location of a cursor.
>>>
>>> I find this fairly worrying. The main reason not to send touch events
>>> through MDs is that it would necessarily cause a storm of
>>> DeviceChangedEvents.
>
> DCE's are only created when you switch between the devices. So unless you
> use your mouse _and_ your touchscreen(s) at the same time, no DCEs will be
> generated. Even if you use mouse and touchscreen in a serial manner, you'll
> only get one DCE whenever you switch between the two.
What if you have a specialized application, like a DJ app, that uses two
magic trackpads with MT simultaneously? If they are both connected to
the same MD, you'll have a storm of DCEs as each touch of each trackpad
is updated. Granted it likely won't be interleaved in between every
touch event, but it will likely be interleaved between touch frames
coming out of evdev.
Further, aside from the DCE storm, we would need to be updating the
touch classes on the master device pointer, which I think would be a lot
of wasted effort. The client can look at the sourceid of the device
event to determine where it came from and to determine the properties of
the device.
>> I am ok with sending events through the MD if the DCEs are not generated
>> for touch events and MDs do not copy touch axes. I think that alleviates
>> the potential performance impact.
>
> what performance impact? I don't think the DCE's are the performance impact
> we have to worry about. if we're sending a DCE every few seconds but
> multiple touch events as second, our optimization paths are somewhere else.
As noted above, I'm worried about sending a DCE, under specific
circumstances, every touch frame. That's a lot of DCEs :).
-- Chase
More information about the xorg-devel
mailing list