[mutter] clutter/stage-cogl: Remove scale_and_clamp_rect() function
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/stage-cogl: Remove scale_and_clamp_rect() function
- Date: Wed, 13 May 2020 11:36:24 +0000 (UTC)
commit b0953b92bacf05efd82f303870433599de74edf4
Author: Jonas Dreßler <verdre v0yd nl>
Date: Thu Mar 5 13:27:24 2020 +0100
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]