[gtk/wip/chergert/glproto] dont set this until we need it



commit 4ebc5749fc25eab18c73999c587f1996f5e8cbb3
Author: Christian Hergert <chergert redhat com>
Date:   Mon Feb 8 17:34:21 2021 -0800

    dont set this until we need it

 gsk/next/gskglcommandqueue.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index 12b0972f1c..eb7494d3f5 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -396,11 +396,6 @@ gsk_gl_command_queue_end_draw (GskGLCommandQueue *self)
   g_assert (self->batches->len > 0);
   g_assert (self->in_draw == TRUE);
 
-  if (self->batches->len > 1)
-    last_batch = &g_array_index (self->batches, GskGLCommandBatch, self->batches->len - 2);
-  else
-    last_batch = NULL;
-
   batch = &g_array_index (self->batches, GskGLCommandBatch, self->batches->len - 1);
 
   g_assert (batch->any.kind == GSK_GL_COMMAND_KIND_DRAW);
@@ -470,6 +465,11 @@ gsk_gl_command_queue_end_draw (GskGLCommandQueue *self)
         }
     }
 
+  if (self->batches->len > 1)
+    last_batch = &g_array_index (self->batches, GskGLCommandBatch, self->batches->len - 2);
+  else
+    last_batch = NULL;
+
   /* Do simple chaining of draw to last batch. */
   /* TODO: Use merging capabilities for out-or-order batching */
   if (batch->draw.uniform_count == 0 &&


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