<div dir="ltr"><div class="gmail_extra">Hi Axel<br><br></div><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 11, 2015 at 7:37 AM, Axel Davy <span dir="ltr"><<a href="mailto:axel.davy@ens.fr" target="_blank">axel.davy@ens.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">XPutImage requires to copy the images around, and the request may be<br>
split over several chunks. Using XShm should improve performance.<br>
<br>
<br>
<br>
</blockquote></span>
Another way of doing that is to make the swrast loader allocate the buffers,<br>
and have swrast swap buffers instead of copying content.<br>
<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
For example there could be a request to allocate a first buffer,<br>
and then a request to present an already allocated buffer, which<br>
would return a new buffer (could be the same).<br>
<br>
Doing that way, it could use XShm behind the scene, and it would fit<br>
different usages, like having a zero copy mechanism for wayland swrast.<br>
</blockquote></div><br>I thought about that, however I don't see how you could wait for X to 
release the buffer, but to sync, because you can't have a private X 
event handler. So effectively, it would use only a single buffer. Also I
 could use guidance to design such an interface. Perhaps doing this on wayland swrast would help defining it though. <br><br></div><div class="gmail_extra">regards<br><br></div><div class="gmail_extra">-- <br><div class="gmail_signature">Marc-AndrĂ© Lureau</div>
</div></div>