gl: Maintain state when truncating

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
This commit is contained in:
Matthias Clasen 2023-02-12 09:56:32 -05:00
parent 157ef1d395
commit b6c3cf4eee

View 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);