gl: Maintain state when truncating
authorMatthias Clasen <mclasen@redhat.com>
Sun, 12 Feb 2023 14:56:32 +0000 (09:56 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 12 Feb 2023 14:56:32 +0000 (09:56 -0500)
When we truncate the command queue because it
is too big, we were messing up our state accounting
and running into criticals as a consequence.

This can be reproduced by opening a well-populated
fishbowl demo in the inspectors recorder.

Fixes: #5188
gsk/gl/gskglcommandqueue.c

index 673958e5790ecdda07052f26a27ff20c6d6e4c9e..72d2b320d019c93ea07c904ffc9e2863b6dcf145 100644 (file)
@@ -570,7 +570,10 @@ gsk_gl_command_queue_end_draw (GskGLCommandQueue *self)
   g_assert (self->batches.len > 0);
 
   if (will_ignore_batch (self))
-    return;
+    {
+      self->in_draw = FALSE;
+      return;
+    }
 
   batch = gsk_gl_command_batches_tail (&self->batches);