From b0953b92bacf05efd82f303870433599de74edf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Thu, 5 Mar 2020 13:27:24 +0100 Subject: [PATCH] clutter/stage-cogl: Remove scale_and_clamp_rect() function This function is only used in offset_scale_and_clamp_region() and can simply be included there. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1113 --- clutter/clutter/cogl/clutter-stage-cogl.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c index 9e897ed1e..43fa34c7f 100644 --- a/clutter/clutter/cogl/clutter-stage-cogl.c +++ b/clutter/clutter/cogl/clutter-stage-cogl.c @@ -430,18 +430,6 @@ swap_framebuffer (ClutterStageWindow *stage_window, } } -static void -scale_and_clamp_rect (const graphene_rect_t *rect, - float scale, - cairo_rectangle_int_t *dest) - -{ - graphene_rect_t tmp = *rect; - - graphene_rect_scale (&tmp, scale, scale, &tmp); - _clutter_util_rectangle_int_extents (&tmp, dest); -} - static cairo_region_t * offset_scale_and_clamp_region (const cairo_region_t *region, int offset_x, @@ -471,7 +459,8 @@ offset_scale_and_clamp_region (const cairo_region_t *region, _clutter_util_rect_from_rectangle (&rects[i], &tmp); graphene_rect_offset (&tmp, offset_x, offset_y); - scale_and_clamp_rect (&tmp, scale, &rects[i]); + graphene_rect_scale (&tmp, scale, scale, &tmp); + _clutter_util_rectangle_int_extents (&tmp, &rects[i]); } return cairo_region_create_rectangles (rects, n_rects);