[gtk/wip/chergert/glproto: 300/526] dont share attachments




commit 60073a4ccaf2536a457f5b42ba85262b693e16cb
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jan 25 15:01:29 2021 -0800

    dont share attachments
    
    these are per-context anyway

 gsk/next/gskglcommandqueue.c        | 12 +++---------
 gsk/next/gskglcommandqueueprivate.h |  3 +--
 gsk/next/gskgldriver.c              |  6 ++----
 3 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index 88f0c18904..ad2ef21337 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -255,9 +255,8 @@ gsk_gl_command_queue_init (GskGLCommandQueue *self)
 }
 
 GskGLCommandQueue *
-gsk_gl_command_queue_new (GdkGLContext         *context,
-                          GskGLUniformState    *uniforms,
-                          GskGLAttachmentState *attachments)
+gsk_gl_command_queue_new (GdkGLContext      *context,
+                          GskGLUniformState *uniforms)
 {
   GskGLCommandQueue *self;
 
@@ -265,12 +264,7 @@ gsk_gl_command_queue_new (GdkGLContext         *context,
 
   self = g_object_new (GSK_TYPE_GL_COMMAND_QUEUE, NULL);
   self->context = g_object_ref (context);
-
-  /* Use shared attachment state if we're provided one */
-  if (attachments != NULL)
-    self->attachments = gsk_gl_attachment_state_ref (attachments);
-  else
-    self->attachments = gsk_gl_attachment_state_new ();
+  self->attachments = gsk_gl_attachment_state_new ();
 
   /* Use shared uniform state if we're provided one */
   if (uniforms != NULL)
diff --git a/gsk/next/gskglcommandqueueprivate.h b/gsk/next/gskglcommandqueueprivate.h
index c136e0ea58..993b75cf59 100644
--- a/gsk/next/gskglcommandqueueprivate.h
+++ b/gsk/next/gskglcommandqueueprivate.h
@@ -111,8 +111,7 @@ struct _GskGLCommandQueue
 };
 
 GskGLCommandQueue *gsk_gl_command_queue_new                  (GdkGLContext             *context,
-                                                              GskGLUniformState        *uniforms,
-                                                              GskGLAttachmentState     *attachments);
+                                                              GskGLUniformState        *uniforms);
 GdkGLContext      *gsk_gl_command_queue_get_context          (GskGLCommandQueue        *self);
 void               gsk_gl_command_queue_make_current         (GskGLCommandQueue        *self);
 void               gsk_gl_command_queue_begin_frame          (GskGLCommandQueue        *self);
diff --git a/gsk/next/gskgldriver.c b/gsk/next/gskgldriver.c
index d9d4935859..b7d5adde7a 100644
--- a/gsk/next/gskgldriver.c
+++ b/gsk/next/gskgldriver.c
@@ -461,7 +461,7 @@ gsk_next_driver_from_shared_context (GdkGLContext  *context,
    * shared context, all other contexts sharing with it will have access
    * to those programs.
    */
-  command_queue = gsk_gl_command_queue_new (context, NULL, NULL);
+  command_queue = gsk_gl_command_queue_new (context, NULL);
 
   if (!(driver = gsk_next_driver_new (command_queue, debug_shaders, error)))
     goto failure;
@@ -1114,7 +1114,5 @@ gsk_next_driver_create_command_queue (GskNextDriver *self,
   g_return_val_if_fail (GSK_IS_NEXT_DRIVER (self), NULL);
   g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), NULL);
 
-  return gsk_gl_command_queue_new (context,
-                                   self->shared_command_queue->uniforms,
-                                   self->shared_command_queue->attachments);
+  return gsk_gl_command_queue_new (context, self->shared_command_queue->uniforms);
 }


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