[mutter] surface-actor: Remove unused APIs



commit 505eabb78cfc2e96e1ed2d8f6c2ac62c4e7b8174
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Jul 31 11:11:43 2014 +0200

    surface-actor: Remove unused APIs

 src/compositor/meta-shaped-texture-private.h |    2 -
 src/compositor/meta-shaped-texture.c         |   68 +++++++++++++-------------
 src/compositor/meta-surface-actor.c          |    8 ---
 src/compositor/meta-surface-actor.h          |    2 -
 4 files changed, 34 insertions(+), 46 deletions(-)
---
diff --git a/src/compositor/meta-shaped-texture-private.h b/src/compositor/meta-shaped-texture-private.h
index 48ae0df..4ee8027 100644
--- a/src/compositor/meta-shaped-texture-private.h
+++ b/src/compositor/meta-shaped-texture-private.h
@@ -32,8 +32,6 @@
 ClutterActor *meta_shaped_texture_new (void);
 void meta_shaped_texture_set_texture (MetaShapedTexture *stex,
                                       CoglTexture       *texture);
-gboolean meta_shaped_texture_get_unobscured_bounds (MetaShapedTexture     *stex,
-                                                    cairo_rectangle_int_t *unobscured_bounds);
 gboolean meta_shaped_texture_is_obscured (MetaShapedTexture *self);
 
 #endif
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index 5983faa..be87e81 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -494,6 +494,39 @@ meta_shaped_texture_get_preferred_height (ClutterActor *self,
     *natural_height_p = priv->tex_height;
 }
 
+static cairo_region_t *
+effective_unobscured_region (MetaShapedTexture *self)
+{
+  MetaShapedTexturePrivate *priv = self->priv;
+  ClutterActor *parent = clutter_actor_get_parent (CLUTTER_ACTOR (self));
+
+  if (clutter_actor_has_mapped_clones (CLUTTER_ACTOR (self)))
+    return NULL;
+
+  while (parent && !META_IS_WINDOW_ACTOR (parent))
+    parent = clutter_actor_get_parent (parent);
+
+  if (parent && clutter_actor_has_mapped_clones (parent))
+    return NULL;
+
+  return priv->unobscured_region;
+}
+
+static gboolean
+get_unobscured_bounds (MetaShapedTexture     *self,
+                       cairo_rectangle_int_t *unobscured_bounds)
+{
+  cairo_region_t *unobscured_region = effective_unobscured_region (self);
+
+  if (unobscured_region)
+    {
+      cairo_region_get_extents (unobscured_region, unobscured_bounds);
+      return TRUE;
+    }
+  else
+    return FALSE;
+}
+
 static gboolean
 meta_shaped_texture_get_paint_volume (ClutterActor *actor,
                                       ClutterPaintVolume *volume)
@@ -507,7 +540,7 @@ meta_shaped_texture_get_paint_volume (ClutterActor *actor,
 
   clutter_actor_get_allocation_box (actor, &box);
 
-  if (meta_shaped_texture_get_unobscured_bounds (self, &unobscured_bounds))
+  if (get_unobscured_bounds (self, &unobscured_bounds))
     {
       box.x1 = MAX (unobscured_bounds.x, box.x1);
       box.x2 = MIN (unobscured_bounds.x + unobscured_bounds.width, box.x2);
@@ -563,39 +596,6 @@ meta_shaped_texture_set_mask_texture (MetaShapedTexture *stex,
   clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
 }
 
-static cairo_region_t *
-effective_unobscured_region (MetaShapedTexture *self)
-{
-  MetaShapedTexturePrivate *priv = self->priv;
-  ClutterActor *parent = clutter_actor_get_parent (CLUTTER_ACTOR (self));
-
-  if (clutter_actor_has_mapped_clones (CLUTTER_ACTOR (self)))
-    return NULL;
-
-  while (parent && !META_IS_WINDOW_ACTOR (parent))
-    parent = clutter_actor_get_parent (parent);
-
-  if (parent && clutter_actor_has_mapped_clones (parent))
-    return NULL;
-
-  return priv->unobscured_region;
-}
-
-gboolean
-meta_shaped_texture_get_unobscured_bounds (MetaShapedTexture     *self,
-                                           cairo_rectangle_int_t *unobscured_bounds)
-{
-  cairo_region_t *unobscured_region = effective_unobscured_region (self);
-
-  if (unobscured_region)
-    {
-      cairo_region_get_extents (unobscured_region, unobscured_bounds);
-      return TRUE;
-    }
-  else
-    return FALSE;
-}
-
 gboolean
 meta_shaped_texture_is_obscured (MetaShapedTexture *self)
 {
diff --git a/src/compositor/meta-surface-actor.c b/src/compositor/meta-surface-actor.c
index 3e7db6b..20933b6 100644
--- a/src/compositor/meta-surface-actor.c
+++ b/src/compositor/meta-surface-actor.c
@@ -42,14 +42,6 @@ enum {
 
 static guint signals[LAST_SIGNAL];
 
-gboolean
-meta_surface_actor_get_unobscured_bounds (MetaSurfaceActor      *self,
-                                          cairo_rectangle_int_t *unobscured_bounds)
-{
-  MetaSurfaceActorPrivate *priv = self->priv;
-  return meta_shaped_texture_get_unobscured_bounds (priv->texture, unobscured_bounds);
-}
-
 static void
 meta_surface_actor_pick (ClutterActor       *actor,
                          const ClutterColor *color)
diff --git a/src/compositor/meta-surface-actor.h b/src/compositor/meta-surface-actor.h
index 3991d52..e5f8286 100644
--- a/src/compositor/meta-surface-actor.h
+++ b/src/compositor/meta-surface-actor.h
@@ -55,8 +55,6 @@ MetaShapedTexture *meta_surface_actor_get_texture (MetaSurfaceActor *self);
 MetaWindow        *meta_surface_actor_get_window  (MetaSurfaceActor *self);
 
 gboolean meta_surface_actor_is_obscured (MetaSurfaceActor *self);
-gboolean meta_surface_actor_get_unobscured_bounds (MetaSurfaceActor      *self,
-                                                   cairo_rectangle_int_t *unobscured_bounds);
 
 void meta_surface_actor_set_input_region (MetaSurfaceActor *self,
                                           cairo_region_t   *region);


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