shell/util: Remove get_content_for_window_actor()

It got replaced by `meta_window_actor_paint_to_content()`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1879>
This commit is contained in:
Robert Mader 2021-06-09 21:18:21 +02:00
parent 36a1fb78cd
commit 483d1b3177
2 changed files with 0 additions and 58 deletions

View File

@ -354,61 +354,6 @@ shell_util_create_pixbuf_from_data (const guchar *data,
typedef const gchar *(*ShellGLGetString) (GLenum); 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 * cairo_surface_t *
shell_util_composite_capture_images (ClutterCapture *captures, shell_util_composite_capture_images (ClutterCapture *captures,
int n_captures, int n_captures,

View File

@ -46,9 +46,6 @@ GdkPixbuf *shell_util_create_pixbuf_from_data (const guchar *data,
int height, int height,
int rowstride); 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, cairo_surface_t * shell_util_composite_capture_images (ClutterCapture *captures,
int n_captures, int n_captures,
int x, int x,