[gtk/wip/chergert/glproto: 279/493] only reset changed textures
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 279/493] only reset changed textures
- Date: Fri, 19 Feb 2021 02:25:13 +0000 (UTC)
commit d9379ba2e1b0b17ed7186df642a7e54f9c77c785
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]