[gtk/wip/chergert/glproto: 341/526] only reset changed textures
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 341/526] only reset changed textures
- Date: Tue, 16 Feb 2021 01:14:34 +0000 (UTC)
commit a3914550d6bd23d08788344de779822e8498421a
Author: Christian Hergert <chergert redhat com>
Date: Wed Jan 27 21:50:39 2021 -0800
only reset changed textures
gsk/next/gskglcommandqueue.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index 8ac3c97522..1f27ee8d08 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -914,9 +914,15 @@ gsk_gl_command_queue_end_frame (GskGLCommandQueue *self)
*/
for (guint i = 0; i < G_N_ELEMENTS (self->attachments->textures); i++)
{
- glActiveTexture (GL_TEXTURE0 + i);
- glBindTexture (GL_TEXTURE_2D, 0);
- self->attachments->textures[i].id = 0;
+ if (self->attachments->textures[i].id != 0)
+ {
+ glActiveTexture (GL_TEXTURE0 + i);
+ glBindTexture (GL_TEXTURE_2D, 0);
+
+ self->attachments->textures[i].id = 0;
+ self->attachments->textures[i].changed = FALSE;
+ self->attachments->textures[i].initial = TRUE;
+ }
}
g_string_chunk_clear (self->debug_groups);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]