From 693456b644b3226f890c20bfd1180ed82ef9160e Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 5 Jul 2015 15:00:17 -0700 Subject: [PATCH] shaped-texture: Remove unnecessary copies of the pipeline --- src/compositor/meta-shaped-texture.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c index 31db9bcc0..d9562f11f 100644 --- a/src/compositor/meta-shaped-texture.c +++ b/src/compositor/meta-shaped-texture.c @@ -205,7 +205,7 @@ get_base_pipeline (CoglContext *ctx) static CoglPipeline * get_unmasked_pipeline (CoglContext *ctx) { - return cogl_pipeline_copy (get_base_pipeline (ctx)); + return get_base_pipeline (ctx); } static CoglPipeline * @@ -220,7 +220,7 @@ get_masked_pipeline (CoglContext *ctx) NULL); } - return cogl_pipeline_copy (template); + return template; } static CoglPipeline * @@ -238,7 +238,7 @@ get_unblended_pipeline (CoglContext *ctx) cogl_pipeline_set_color (template, &color); } - return cogl_pipeline_copy (template); + return template; } static void @@ -449,8 +449,6 @@ meta_shaped_texture_paint (ClutterActor *actor) cairo_region_get_rectangle (region, i, &rect); paint_clipped_rectangle (fb, opaque_pipeline, &rect, &alloc); } - - cogl_object_unref (opaque_pipeline); } cairo_region_destroy (region); @@ -513,8 +511,6 @@ meta_shaped_texture_paint (ClutterActor *actor) alloc.x2 - alloc.x1, alloc.y2 - alloc.y1); } - - cogl_object_unref (blended_pipeline); } if (blended_region != NULL)