diff --git a/src/shell-util.c b/src/shell-util.c index 0bc3f4d65..bdbfe8391 100644 --- a/src/shell-util.c +++ b/src/shell-util.c @@ -354,61 +354,6 @@ shell_util_create_pixbuf_from_data (const guchar *data, typedef const gchar *(*ShellGLGetString) (GLenum); -static gboolean -canvas_draw_cb (ClutterContent *content, - cairo_t *cr, - gint width, - gint height, - gpointer user_data) -{ - cairo_surface_t *surface = user_data; - - cairo_set_source_surface (cr, surface, 0, 0); - cairo_paint (cr); - - return FALSE; -} - -/** - * shell_util_get_content_for_window_actor: - * @window_actor: a #MetaWindowActor - * @window_rect: a #MetaRectangle - * - * Returns: (transfer full) (nullable): a new #ClutterContent - */ -ClutterContent * -shell_util_get_content_for_window_actor (MetaWindowActor *window_actor, - MetaRectangle *window_rect) -{ - ClutterContent *content; - cairo_surface_t *surface; - cairo_rectangle_int_t clip; - gfloat actor_x, actor_y; - - clutter_actor_get_position (CLUTTER_ACTOR (window_actor), &actor_x, &actor_y); - - clip.x = window_rect->x - (gint) actor_x; - clip.y = window_rect->y - (gint) actor_y; - clip.width = window_rect->width; - clip.height = window_rect->height; - - surface = meta_window_actor_get_image (window_actor, &clip); - - if (!surface) - return NULL; - - content = clutter_canvas_new (); - clutter_canvas_set_size (CLUTTER_CANVAS (content), - cairo_image_surface_get_width (surface), - cairo_image_surface_get_height (surface)); - g_signal_connect (content, "draw", - G_CALLBACK (canvas_draw_cb), surface); - clutter_content_invalidate (content); - cairo_surface_destroy (surface); - - return content; -} - cairo_surface_t * shell_util_composite_capture_images (ClutterCapture *captures, int n_captures, diff --git a/src/shell-util.h b/src/shell-util.h index d0de033f6..04485b99c 100644 --- a/src/shell-util.h +++ b/src/shell-util.h @@ -46,9 +46,6 @@ GdkPixbuf *shell_util_create_pixbuf_from_data (const guchar *data, int height, int rowstride); -ClutterContent * shell_util_get_content_for_window_actor (MetaWindowActor *window_actor, - MetaRectangle *window_rect); - cairo_surface_t * shell_util_composite_capture_images (ClutterCapture *captures, int n_captures, int x,