frame: Inline get_mask where it is used

The function was used only once so just move it content where it is
called. It allows us to drop more cairo paths from the API surface even
if it is not part of a public api

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3581>
This commit is contained in:
Bilal Elmoussaoui 2024-02-13 13:57:55 +01:00 committed by Marge Bot
parent 007ac59919
commit e31c47877a
3 changed files with 6 additions and 22 deletions

View File

@ -859,7 +859,12 @@ build_and_scan_frame_mask (MetaWindowActorX11 *actor_x11,
region_to_cairo_path (frame_paint_region, cr);
cairo_clip (cr);
meta_frame_get_mask (window->frame, &frame_rect, cr);
cairo_rectangle (cr,
0, 0,
window->frame->rect.width,
window->frame->rect.height);
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_fill (cr);
cairo_surface_flush (image);
scanned_region = scan_visible_region (mask_data, stride, frame_paint_region);

View File

@ -413,23 +413,6 @@ meta_frame_get_frame_bounds (MetaFrame *frame)
return bounds;
}
void
meta_frame_get_mask (MetaFrame *frame,
MtkRectangle *frame_rect,
cairo_t *cr)
{
MetaFrameBorders borders;
meta_frame_calc_borders (frame, &borders);
cairo_rectangle (cr,
0, 0,
frame->rect.width,
frame->rect.height);
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_fill (cr);
}
Window
meta_frame_get_xwindow (MetaFrame *frame)
{

View File

@ -69,10 +69,6 @@ void meta_frame_clear_cached_borders (MetaFrame *frame);
MtkRegion *meta_frame_get_frame_bounds (MetaFrame *frame);
void meta_frame_get_mask (MetaFrame *frame,
MtkRectangle *frame_rect,
cairo_t *cr);
gboolean meta_frame_handle_xevent (MetaFrame *frame,
XEvent *event);