<p>Interesting approach, similar to GL using a series of matricies.</p>
<p>This would fit perfectly into an event driven input infrastructure I'm researching, with the low level protocol drivers handling that end and a series of filters or chains processing and transforming the input before handing it off to the internal event system.</p>
<p>--<br>
Timothy Meade<br>
tmzt on freenode</p>
<div class="gmail_quote">On Apr 5, 2011 7:08 AM, "Simon Thum" <<a href="mailto:simon.thum@gmx.de">simon.thum@gmx.de</a>> wrote:<br type="attribution">> Hi Orhan,<br>> <br>> please answer to all, makes life easier for everyone. I just saw that<br>
> mail by incident.<br>> <br>> On 03/29/2011 04:41 PM, Orhan Kavrakoglu wrote:<br>>> On 03/29/2011 02:56 PM, Simon Thum wrote:<br>>>> It's technically correct, and I welcome people to patch it into distros,<br>
>>> but for master I'd prefer a conceptually clean solution. But if it turns<br>>>> out there's no support for the concept as described, we should probably<br>>>> add it to master (given you provide a man page entry).<br>
>>><br>>> <br>>> I see. Unfortunately, I'm nowhere near familiar enough with the input<br>>> code to implement this. Though I'm willing to try, it will take some<br>>> time, to say the least. (Some reading pointers would be great, at this<br>
>> point.)<br>> Well, it's an RFC by Peter at the moment, AFAIK not much to read. I'll<br>> add a bit to my idea FYC. The concept would probably use pixman and<br>> list.h-lists and look something like:<br>
> <br>> struct TransformChain {<br>> Bool is_dirty;<br>> Bool is_unit;<br>> struct TransformNode* chain;<br>> pixman_f_matrix transform;<br>> }<br>> <br>> struct TransformNode{<br>> pixman_f_matrix transform;<br>
> struct list *prev, *next; /* see list.h */<br>> }<br>> <br>> /* prepare matrices, don't malloc as we call this from the event loop */<br>> Bool PrepareTransform(TransformChain* tc) {<br>> if (tc->is_dirty) {<br>
> // squash chained matrices together (pixman_f_matrix_multiply or<br>> so), supply unit if no matrices are there<br>> tc->transform = result;<br>> tc->is_unit = pixman_f_matrix_is_unit(tc->transform);<br>
> tc->is_dirty = false;<br>> }<br>> return !tc->is_unit;<br>> }<br>> <br>> // ... helpers to prepend and append transforms, setting the dirty flag,<br>> init etc.<br>> <br>> struct DeviceInt {<br>
> ...<br>> TransformChain raw_transform; /* the transform from driver input<br>> ("raw" in XI2) to nice-and-friendly XI/core X coordinates */<br>> ...<br>> }<br>> <br>> In GetPointerEvents(), we'd apply the transform like<br>
> <br>> if (PrepareTransform(&dev->raw_transform)) {<br>> // apply<br>> } else {<br>> // fast path: just copy over<br>> }<br>> <br>> Drivers could use that or have an own chain if they like to.<br>
> Each linear transform we want to have could simply be modeled as a node<br>> in this chain. Due to affinity, this would even include the transform<br>> matrix we have in place for abs mode already.<br>> <br>
> Technically, we'd first need to resolve how<br>> dev->valuators->last.remainder is handled, but that's not really hard.<br>> Mostly we'd need to kick it by streamlining the sub-pixel processing.<br>
> <br>> Peter, do you have any plans in that direction (subpixel)?<br>> <br>> <br>>> <br>>> There's another thing: The profile I posted is equivalent to the "none"<br>>> profile (-1) when acc = 1.0. Do you think it is feasible to merge the two?<br>
> I don't really see a point in that. In a sense, "flat" _is_ "none", but<br>> there's more gain from an approach as outlined above. Acceleration does<br>> scaling as a historical necessity, but that doesn't means it's a good idea.<br>
> <br>>> <br>>> As this was my first patch, there was bound to be something missing. I<br>>> will update the man entry in any case.<br>> Just go ahead. As said, it's probably suitable for anything but master.<br>
> <br>> Cheers,<br>> <br>> Simon<br>> <br>>> <br>>> Thanks for your help,<br>>> Orhan<br>>> <br>>> _______________________________________________<br>>> <a href="mailto:xorg-devel@lists.x.org">xorg-devel@lists.x.org</a>: X.Org development<br>
>> Archives: <a href="http://lists.x.org/archives/xorg-devel">http://lists.x.org/archives/xorg-devel</a><br>>> Info: <a href="http://lists.x.org/mailman/listinfo/xorg-devel">http://lists.x.org/mailman/listinfo/xorg-devel</a><br>
>> <br>> <br>> _______________________________________________<br>> <a href="mailto:xorg-devel@lists.x.org">xorg-devel@lists.x.org</a>: X.Org development<br>> Archives: <a href="http://lists.x.org/archives/xorg-devel">http://lists.x.org/archives/xorg-devel</a><br>
> Info: <a href="http://lists.x.org/mailman/listinfo/xorg-devel">http://lists.x.org/mailman/listinfo/xorg-devel</a><br></div>