diff --git a/cogl/cogl-pipeline-private.h b/cogl/cogl-pipeline-private.h index b4452b368..0e3b6c916 100644 --- a/cogl/cogl-pipeline-private.h +++ b/cogl/cogl-pipeline-private.h @@ -604,6 +604,23 @@ _cogl_pipeline_init_default_pipeline (void); void _cogl_pipeline_init_default_layers (void); +static inline CoglPipeline * +_cogl_pipeline_get_parent (CoglPipeline *pipeline) +{ + CoglPipelineNode *parent_node = COGL_PIPELINE_NODE (pipeline)->parent; + return COGL_PIPELINE (parent_node); +} + +static inline CoglPipeline * +_cogl_pipeline_get_authority (CoglPipeline *pipeline, + unsigned long difference) +{ + CoglPipeline *authority = pipeline; + while (!(authority->differences & difference)) + authority = _cogl_pipeline_get_parent (authority); + return authority; +} + /* * SECTION:cogl-pipeline-internals * @short_description: Functions for creating custom primitives that make use diff --git a/cogl/cogl-pipeline.c b/cogl/cogl-pipeline.c index 9d38c7535..7932911a2 100644 --- a/cogl/cogl-pipeline.c +++ b/cogl/cogl-pipeline.c @@ -551,23 +551,6 @@ _cogl_pipeline_get_real_blend_enabled (CoglPipeline *pipeline) return pipeline->real_blend_enable; } -inline CoglPipeline * -_cogl_pipeline_get_parent (CoglPipeline *pipeline) -{ - CoglPipelineNode *parent_node = COGL_PIPELINE_NODE (pipeline)->parent; - return COGL_PIPELINE (parent_node); -} - -CoglPipeline * -_cogl_pipeline_get_authority (CoglPipeline *pipeline, - unsigned long difference) -{ - CoglPipeline *authority = pipeline; - while (!(authority->differences & difference)) - authority = _cogl_pipeline_get_parent (authority); - return authority; -} - /* XXX: Think twice before making this non static since it is used * heavily and we expect the compiler to inline it... */