[gtk/wip/chergert/glproto: 144/526] add some debug helpers
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 144/526] add some debug helpers
- Date: Tue, 16 Feb 2021 01:14:27 +0000 (UTC)
commit 663a587d9a028b85633f574dd221ca4169b315ba
Author: Christian Hergert <chergert redhat com>
Date: Tue Dec 29 10:25:50 2020 -0800
add some debug helpers
gsk/next/gskglprogram.c | 16 ++++++++++++++++
gsk/next/gskglprogramprivate.h | 2 ++
2 files changed, 18 insertions(+)
---
diff --git a/gsk/next/gskglprogram.c b/gsk/next/gskglprogram.c
index 1f266cfdec..68c4933874 100644
--- a/gsk/next/gskglprogram.c
+++ b/gsk/next/gskglprogram.c
@@ -56,6 +56,22 @@ gsk_gl_program_new (GskGLCommandQueue *command_queue,
return self;
}
+int
+gsk_gl_program_get_id (GskGLProgram *self)
+{
+ g_return_val_if_fail (GSK_IS_GL_PROGRAM (self), -1);
+
+ return self->id;
+}
+
+const char *
+gsk_gl_program_get_name (GskGLProgram *self)
+{
+ g_return_val_if_fail (GSK_IS_GL_PROGRAM (self), NULL);
+
+ return self->name;
+}
+
static void
gsk_gl_program_finalize (GObject *object)
{
diff --git a/gsk/next/gskglprogramprivate.h b/gsk/next/gskglprogramprivate.h
index 70ffc96115..e866f79b76 100644
--- a/gsk/next/gskglprogramprivate.h
+++ b/gsk/next/gskglprogramprivate.h
@@ -32,6 +32,8 @@ G_DECLARE_FINAL_TYPE (GskGLProgram, gsk_gl_program, GSK, GL_PROGRAM, GObject)
GskGLProgram *gsk_gl_program_new (GskGLCommandQueue *command_queue,
const char *name,
int program_id);
+int gsk_gl_program_get_id (GskGLProgram *self);
+const char *gsk_gl_program_get_name (GskGLProgram *self);
gboolean gsk_gl_program_add_uniform (GskGLProgram *self,
const char *name,
guint key);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]