summaryrefslogtreecommitdiff
path: root/gsk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-02-12 09:56:32 -0500
committerMatthias Clasen <mclasen@redhat.com>2023-02-12 09:56:32 -0500
commitb6c3cf4eee7af05d7bd5ce4fd9f421a2ae03d60b (patch)
tree46b1feeb2188a09547e65f8bf485fc12a47dc74a /gsk
parent157ef1d3959947593e914496f02a86e2f062a91c (diff)
downloadgtk+-b6c3cf4eee7af05d7bd5ce4fd9f421a2ae03d60b.tar.gz
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
Diffstat (limited to 'gsk')
-rw-r--r--gsk/gl/gskglcommandqueue.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gsk/gl/gskglcommandqueue.c b/gsk/gl/gskglcommandqueue.c
index 673958e579..72d2b320d0 100644
--- a/gsk/gl/gskglcommandqueue.c
+++ b/gsk/gl/gskglcommandqueue.c
@@ -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);