<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Hi,<br><br>somewhat related to the issue of posting vs. queuing buffer.release event is a condition I have found that starves idle handlers in window.c.<br>

<br></div>
If the SwapBuffers implementation waits for buffer.release events to make sure that the GPU doesn't overwrite the front buffer and the client performs its rendering on the frame callback (for example, the subsurface example), the following happens:<br>

<br>
</div>1. window.c calls wl_display_dispatch, which in turn calls dispatch_queue and eventually the client's frame callback handler<br></div>2. client executes GL commands<br></div>3. client registers a new frame callback<br>


</div>4. client calls SwapBuffers<br></div>5. in SwapBuffers, wl_display_dispatch_queue is called while waiting for buffer.release<br></div>6. once buffer.release comes, a new frame event has been read from the fd and placed in the main queue<br>


</div>7. control is returned to dispatch_queue which dispatches the new frame event, going back to 2<br><br></div>Thus control never returns to the main loop and no other idle tasks are ever ran.<br><br></div>To my untrained eyes, this seems more than just a bug in toytoolkit, so I will love to hear any comments.<br>

<br></div>Thanks,<br><br>Tomeu<br></div>