From 152fdc89fc9ae594c4c072bfeab566e241bab9e1 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Tue, 8 Aug 2023 12:41:37 +0200 Subject: [PATCH] clutter: Drop _clutter_util_rectangle_offset It is only used once so there is no need to port it to Mtk Part-of: --- clutter/clutter/clutter-private.h | 5 ----- clutter/clutter/clutter-stage-view.c | 6 ++---- clutter/clutter/clutter-util.c | 12 ------------ 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/clutter/clutter/clutter-private.h b/clutter/clutter/clutter-private.h index af5b1dd79..f73d73596 100644 --- a/clutter/clutter/clutter-private.h +++ b/clutter/clutter/clutter-private.h @@ -206,11 +206,6 @@ CLUTTER_EXPORT void _clutter_util_rectangle_int_extents (const graphene_rect_t *src, MtkRectangle *dest); -void _clutter_util_rectangle_offset (const MtkRectangle *src, - int x, - int y, - MtkRectangle *dest); - CLUTTER_EXPORT PangoDirection _clutter_pango_unichar_direction (gunichar ch); diff --git a/clutter/clutter/clutter-stage-view.c b/clutter/clutter/clutter-stage-view.c index a31d1f3c2..168746dd4 100644 --- a/clutter/clutter/clutter-stage-view.c +++ b/clutter/clutter/clutter-stage-view.c @@ -278,10 +278,8 @@ paint_transformed_framebuffer (ClutterStageView *view, MtkRectangle dst_rect; cairo_region_get_rectangle (redraw_clip, i, &src_rect); - _clutter_util_rectangle_offset (&src_rect, - -view_layout.x, - -view_layout.y, - &src_rect); + src_rect.x -= view_layout.x; + src_rect.y -= view_layout.y; clutter_stage_view_transform_rect_to_onscreen (view, &src_rect, diff --git a/clutter/clutter/clutter-util.c b/clutter/clutter/clutter-util.c index 2bcfb7d9b..0abe6c6c7 100644 --- a/clutter/clutter/clutter-util.c +++ b/clutter/clutter/clutter-util.c @@ -135,18 +135,6 @@ _clutter_util_rectangle_int_extents (const graphene_rect_t *src, }; } -void -_clutter_util_rectangle_offset (const MtkRectangle *src, - int x, - int y, - MtkRectangle *dest) -{ - *dest = *src; - - dest->x += x; - dest->y += y; -} - typedef struct { GType value_type;