[mutter] MetaRendererNative: Don't requeue flush-swap-notify



commit d9a9844005132d98c54b645adeeab351e2441cc8
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Wed Nov 23 22:46:26 2016 +0800

    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

 src/backends/native/meta-renderer-native.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index c1b0840..b0845f4 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -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 */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]