On 02/05/2015 09:47 AM, Tapani Pälli wrote:

On 02/03/2015 10:07 PM, Chad Versace wrote:
It seems that two solutions are available:

   S1. Provide waffle_set_swap_buffers_callback().

S2. On Waffle's NaCl backend, implement waffle_swap_buffers() to block until the back buffer has been composited onto the web page. (I believe
       this is possible to implement without a worker thread).

I guess it is possible but not without introducing extra latency/slowness for the application thread which I was trying to avoid. Ideally app could continue doing something else while swap goes on.


Having experimented this for some time with this I don't think this is possible to implement. Problem is that I can't wait in the main thread for the callback to be called (blocking somewhere within waffle_swap_buffers), the event dispatcher never gets run and there is no API to 'flush event queue' or 'run single iteration of event dispatcher'. There is way to get pp::MessageLoop of the main thread but you can just post more work to it. I vote for the thread, I don't find problems with it :)

// Tapani

_______________________________________________
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle

Reply via email to