[gtk/wip/chergert/glproto] add viewport hook



commit 1339bc7ad18ec85935d74e61f42b5d1532c06a21
Author: Christian Hergert <chergert redhat com>
Date:   Sun Dec 20 11:19:24 2020 -0800

    add viewport hook

 gsk/next/gskglcommandqueue.c        | 9 +++++++++
 gsk/next/gskglcommandqueueprivate.h | 2 ++
 2 files changed, 11 insertions(+)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index 53751e0424..60fe94061c 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -1097,6 +1097,15 @@ gsk_gl_command_queue_bind_framebuffer (GskGLCommandQueue *self,
   gsk_gl_attachment_state_bind_framebuffer (self->attachments, framebuffer);
 }
 
+void
+gsk_gl_command_queue_set_viewport (GskGLCommandQueue     *self,
+                                   const graphene_rect_t *viewport)
+{
+  g_return_if_fail (GSK_IS_GL_COMMAND_QUEUE (self));
+
+  /* TODO: Set viewport as part of batch */
+}
+
 static void
 gsk_gl_command_queue_save (GskGLCommandQueue *self)
 {
diff --git a/gsk/next/gskglcommandqueueprivate.h b/gsk/next/gskglcommandqueueprivate.h
index f4eaf109d4..8759041a90 100644
--- a/gsk/next/gskglcommandqueueprivate.h
+++ b/gsk/next/gskglcommandqueueprivate.h
@@ -35,6 +35,8 @@ void               gsk_gl_command_queue_make_current             (GskGLCommandQu
 void               gsk_gl_command_queue_begin_frame              (GskGLCommandQueue        *self);
 void               gsk_gl_command_queue_end_frame                (GskGLCommandQueue        *self);
 void               gsk_gl_command_queue_execute                  (GskGLCommandQueue        *self);
+void               gsk_gl_command_queue_set_viewport             (GskGLCommandQueue        *self,
+                                                                  const graphene_rect_t    *viewport);
 GdkTexture        *gsk_gl_command_queue_download                 (GskGLCommandQueue        *self,
                                                                   GError                  **error);
 GdkMemoryTexture  *gsk_gl_command_queue_download_texture         (GskGLCommandQueue        *self,


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