Composite redraw speedup?
Egil Möller
egil at innovationgarage.no
Sun Feb 16 22:23:13 UTC 2020
On 12.02.2020 19:18, Alan Coopersmith wrote:
> On 2/12/20 1:28 AM, Egil Möller wrote:
>> However, for every PropertyNotify event, I still do a full round trip
>> with XGetWindowProperty, with every XI_RawMotion I do XQueryPointer and
>> with every XDamageNotify I do
>> XCompositeNameWindowPixmap/glXCreatePixmap/glXBindTexImageEXT... It
>> seems to me it's the multiplexing of these three categories that are
>> causing problems for me...
>
> You can use the xcb API's to replace XGetWindowProperty &
> XQueryPointer with
> asynchronous calls instead of stalling your drawing pipeline to wait
> for a
> response:
>
> https://www.x.org/wiki/guide/xlib-and-xcb/
> https://blogs.oracle.com/solaris/porting-x-apps-to-xcb-v2
>
Ok, so xcb sounds like it could help a bit... but: is it possible in xcb
to wait on events and cookies? E.g. something along the lines of
while ( (event_or_cookie = xcb_wait_for_event_or_cookie
(connection)) ) {
if (xcb_is_event(event_or_cookie)) {
switch (event->response_type & ~0x80) {
case XCB_EXPOSE:
...
}
} else {
for (i = 0; i < tasks_count; i++) {
if (task[i]->cookie == event_or_cookie) {
task[i]->handle(); break; }
}
}
}
Otherwise, events are still gonna be blocked while I'm waiting for
replies, or vice versa...
/Egil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.x.org/archives/xorg-devel/attachments/20200216/08ca8aae/attachment.sig>
More information about the xorg-devel
mailing list