From 02c8249e0b52b605e414ac6f95aaf38e43093698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 5 Jan 2024 11:46:59 +0100 Subject: [PATCH] shell/util: Drop unused capture_images() function It hasn't been used since commit 757e4b6731, so drop it. This also avoids a warning when generating the typelib that was introduced in commit f48729f6e. Part-of: --- src/shell-util.c | 42 ------------------------------------------ src/shell-util.h | 14 -------------- 2 files changed, 56 deletions(-) diff --git a/src/shell-util.c b/src/shell-util.c index 35d1f6fa3..3f91d547d 100644 --- a/src/shell-util.c +++ b/src/shell-util.c @@ -353,48 +353,6 @@ shell_util_create_pixbuf_from_data (const guchar *data, typedef const gchar *(*ShellGLGetString) (GLenum); -cairo_surface_t * -shell_util_composite_capture_images (StCapture *captures, - int n_captures, - int x, - int y, - int target_width, - int target_height, - float target_scale) -{ - int i; - cairo_format_t format; - cairo_surface_t *image; - cairo_t *cr; - - g_assert (n_captures > 0); - g_assert (target_scale > 0.0f); - - format = cairo_image_surface_get_format (captures[0].image); - image = cairo_image_surface_create (format, target_width, target_height); - cairo_surface_set_device_scale (image, target_scale, target_scale); - - cr = cairo_create (image); - - for (i = 0; i < n_captures; i++) - { - StCapture *capture = &captures[i]; - - cairo_save (cr); - - cairo_translate (cr, - capture->rect.x - x, - capture->rect.y - y); - cairo_set_source_surface (cr, capture->image, 0, 0); - cairo_paint (cr); - - cairo_restore (cr); - } - cairo_destroy (cr); - - return image; -} - #ifndef HAVE_FDWALK static int fdwalk (int (*cb)(void *data, int fd), diff --git a/src/shell-util.h b/src/shell-util.h index 8e29ec7ce..03e75abec 100644 --- a/src/shell-util.h +++ b/src/shell-util.h @@ -11,12 +11,6 @@ G_BEGIN_DECLS -typedef struct _StCapture -{ - cairo_surface_t *image; - MtkRectangle rect; -} StCapture; - void shell_util_set_hidden_from_pick (ClutterActor *actor, gboolean hidden); @@ -52,14 +46,6 @@ GdkPixbuf *shell_util_create_pixbuf_from_data (const guchar *data, int height, int rowstride); -cairo_surface_t * shell_util_composite_capture_images (StCapture *captures, - int n_captures, - int x, - int y, - int target_width, - int target_height, - float target_scale); - void shell_util_check_cloexec_fds (void); void shell_util_start_systemd_unit (const char *unit,