[gtk/wip/chergert/glproto: 325/526] track if we're in a frame
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 325/526] track if we're in a frame
- Date: Tue, 16 Feb 2021 01:14:33 +0000 (UTC)
commit a47b46070b7e21503a49c60d47f56e5b9758b5b0
Author: Christian Hergert <chergert redhat com>
Date: Wed Jan 27 14:06:12 2021 -0800
track if we're in a frame
gsk/next/gskglcommandqueue.c | 2 ++
gsk/next/gskglcommandqueueprivate.h | 3 +++
2 files changed, 5 insertions(+)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index 6a8bd2a02d..8ac3c97522 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -884,6 +884,7 @@ gsk_gl_command_queue_begin_frame (GskGLCommandQueue *self)
g_return_if_fail (self->batches->len == 0);
self->tail_batch_index = -1;
+ self->in_frame = TRUE;
}
/**
@@ -925,6 +926,7 @@ gsk_gl_command_queue_end_frame (GskGLCommandQueue *self)
self->batch_uniforms->len = 0;
self->batch_binds->len = 0;
self->tail_batch_index = -1;
+ self->in_frame = FALSE;
}
gboolean
diff --git a/gsk/next/gskglcommandqueueprivate.h b/gsk/next/gskglcommandqueueprivate.h
index 993b75cf59..9f9171a133 100644
--- a/gsk/next/gskglcommandqueueprivate.h
+++ b/gsk/next/gskglcommandqueueprivate.h
@@ -106,6 +106,9 @@ struct _GskGLCommandQueue
*/
int tail_batch_index;
+ /* If we're inside a begin/end_frame pair */
+ guint in_frame : 1;
+
/* If we're inside of a begin_draw()/end_draw() pair. */
guint in_draw : 1;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]