diff --git a/src/compositor/meta-window-actor-x11.c b/src/compositor/meta-window-actor-x11.c index 201c3e15f..24f2a50ed 100644 --- a/src/compositor/meta-window-actor-x11.c +++ b/src/compositor/meta-window-actor-x11.c @@ -771,6 +771,22 @@ get_client_area_rect (MetaWindowActorX11 *actor_x11, get_client_area_rect_from_texture (actor_x11, stex, client_area); } +static void +region_to_cairo_path (MtkRegion *region, + cairo_t *cr) +{ + MtkRectangle rect; + int n_rects, i; + + n_rects = mtk_region_num_rectangles (region); + + for (i = 0; i < n_rects; i++) + { + rect = mtk_region_get_rectangle (region, i); + cairo_rectangle (cr, rect.x, rect.y, rect.width, rect.height); + } +} + static void build_and_scan_frame_mask (MetaWindowActorX11 *actor_x11, MtkRegion *shape_region) @@ -810,7 +826,7 @@ build_and_scan_frame_mask (MetaWindowActorX11 *actor_x11, stride); cr = cairo_create (image); - meta_region_to_cairo_path (shape_region, cr); + region_to_cairo_path (shape_region, cr); cairo_fill (cr); if (window->frame) @@ -842,7 +858,7 @@ build_and_scan_frame_mask (MetaWindowActorX11 *actor_x11, frame_paint_region = mtk_region_create_rectangle (&rect); mtk_region_subtract_rectangle (frame_paint_region, &client_area); - meta_region_to_cairo_path (frame_paint_region, cr); + region_to_cairo_path (frame_paint_region, cr); cairo_clip (cr); meta_frame_get_mask (window->frame, &frame_rect, cr); diff --git a/src/compositor/region-utils.c b/src/compositor/region-utils.c index 118e922a3..3748f92ff 100644 --- a/src/compositor/region-utils.c +++ b/src/compositor/region-utils.c @@ -428,22 +428,6 @@ meta_region_crop_and_scale (MtkRegion *region, return viewport_region; } -void -meta_region_to_cairo_path (MtkRegion *region, - cairo_t *cr) -{ - MtkRectangle rect; - int n_rects, i; - - n_rects = mtk_region_num_rectangles (region); - - for (i = 0; i < n_rects; i++) - { - rect = mtk_region_get_rectangle (region, i); - cairo_rectangle (cr, rect.x, rect.y, rect.width, rect.height); - } -} - MtkRegion * meta_region_apply_matrix_transform_expand (const MtkRegion *region, graphene_matrix_t *transform) diff --git a/src/compositor/region-utils.h b/src/compositor/region-utils.h index 0c847fb6e..13162429f 100644 --- a/src/compositor/region-utils.h +++ b/src/compositor/region-utils.h @@ -20,7 +20,6 @@ #pragma once -#include #include #include "backends/meta-backend-types.h" @@ -111,8 +110,6 @@ MtkRegion * meta_region_crop_and_scale (MtkRegion *region, int dst_width, int dst_height); -void meta_region_to_cairo_path (MtkRegion *region, - cairo_t *cr); MtkRegion * meta_region_apply_matrix_transform_expand (const MtkRegion *region,