MetaRendererNative: Don't requeue flush-swap-notify

When flush-swap-notify is already queued, we might end up trying to
requeue it, for example when handling flip callbacks inside
swap-buffers. Actually queuing it there is harmless, since old frames
will be discarded anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=774923
This commit is contained in:
Jonas Ådahl 2016-11-23 22:46:26 +08:00 committed by Rui Matos
parent 227187f1f1
commit d9a9844005

View File

@ -242,6 +242,9 @@ meta_onscreen_native_queue_swap_notify (CoglOnscreen *onscreen)
CoglRendererEGL *egl_renderer = cogl_renderer->winsys;
MetaRendererNative *renderer_native = egl_renderer->platform;
if (onscreen_native->pending_swap_notify)
return;
/* We only want to notify that the swap is complete when the
* application calls cogl_context_dispatch so instead of
* immediately notifying we queue an idle callback */