cogl/pipeline: Use G_DECLARE_FINAL_TYPE

Lets us get rid of the boilerplate.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4155>
This commit is contained in:
Georges Basile Stavracas Neto 2024-11-29 20:20:32 -03:00 committed by Marge Bot
parent b0fd29ece2
commit ac07f10de3
2 changed files with 2 additions and 16 deletions

View File

@ -382,11 +382,6 @@ struct _CoglPipeline
const char *name;
};
struct _CoglPipelineClass
{
GObjectClass parent_class;
};
typedef struct _CoglPipelineFragend
{
void (*start) (CoglPipeline *pipeline,

View File

@ -55,20 +55,11 @@ G_BEGIN_DECLS
* performs fragment processing including depth testing and texture
* mapping. Finally it blends the result with the framebuffer.
*/
#define COGL_TYPE_PIPELINE (cogl_pipeline_get_type ())
#define COGL_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), COGL_TYPE_PIPELINE, CoglPipeline))
#define COGL_PIPELINE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), COGL_TYPE_PIPELINE, CoglPipeline const))
#define COGL_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), COGL_TYPE_PIPELINE, CoglPipelineClass))
#define COGL_IS_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), COGL_TYPE_PIPELINE))
#define COGL_IS_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), COGL_TYPE_PIPELINE))
#define COGL_PIPELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), COGL_TYPE_PIPELINE, CoglPipelineClass))
typedef struct _CoglPipelineClass CoglPipelineClass;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CoglPipeline, g_object_unref)
#define COGL_TYPE_PIPELINE (cogl_pipeline_get_type ())
COGL_EXPORT
GType cogl_pipeline_get_type (void) G_GNUC_CONST;
G_DECLARE_FINAL_TYPE (CoglPipeline, cogl_pipeline, COGL, PIPELINE, GObject)
/**
* cogl_pipeline_new: (constructor)