[Cogl] ensure _SYNC and _COMPLETE events are always dispatched

Robert Bragg robert at sixbynine.org
Tue Jan 29 11:07:29 PST 2013


On Tue, Jan 29, 2013 at 6:46 PM, Neil Roberts <neil at linux.intel.com> wrote:
> There is still this bit of code at the end of
> _cogl_winsys_onscreen_swap_buffers() for the GLX driver:
>
>   if (!(glx_renderer->glXSwapInterval &&
>         _cogl_winsys_has_feature (COGL_WINSYS_FEATURE_VBLANK_WAIT)))
>     set_complete_pending (onscreen);
>
> Unless I've misunderstood something this seems wrong. Surely whenever
> swap buffers is called it will already always send the complete event,
> either when we get the swap event or in the upper layers of
> CoglOnscreen if swap events are not available. It looks like it would
> be sending the event twice with this bit of code?

ah yeah, I forgot to remove that.

>
> If we remove that bit of code then there's actually no situation were
> we send a complete event without also sending the sync notify event so
> it might be worth getting rid of one of the flags in the GLX winsys.
> On the other hand if we expect to have a separate complete event later
> then we could just leave it to make future patches easier.

Right this was picked up in some of the earlier review too (I had
looked at changing the code to just use one flag) but Owen noted that
we're going to want two flags later once we have the _FRAME_TIMINGS
ICCCM message, so we ended up keeping the separate flags for now.

>
> I'm also posting another patch with a minor tidy up which I think
> would be worth squashing in too.

thanks

regards,
- Robert

>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list