[Cogl] ensure _SYNC and _COMPLETE events are always dispatched

Neil Roberts neil at linux.intel.com
Tue Jan 29 10:46:09 PST 2013


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?

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.

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



More information about the Cogl mailing list