clutter/stage: Remove 'paint' argument in capture_into()

There are more suitable API when the stage needs to be actually painted
into something. Nothing actually used this anymore too, so remove this
functionality.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1689>
This commit is contained in:
Jonas Ådahl 2021-01-27 16:37:48 +01:00 committed by Marge Bot
parent 662e29990a
commit 1d4e535e7a
3 changed files with 2 additions and 16 deletions

View File

@ -51,7 +51,6 @@ int64_t clutter_stage_get_frame_counter (ClutterStage *stage);
CLUTTER_EXPORT
void clutter_stage_capture_into (ClutterStage *stage,
gboolean paint,
cairo_rectangle_int_t *rect,
uint8_t *data);

View File

@ -179,7 +179,6 @@ static const ClutterColor default_stage_color = { 255, 255, 255, 255 };
static void free_queue_redraw_entry (QueueRedrawEntry *entry);
static void free_pointer_device_entry (PointerDeviceEntry *entry);
static void capture_view_into (ClutterStage *stage,
gboolean paint,
ClutterStageView *view,
cairo_rectangle_int_t *rect,
uint8_t *data,
@ -3268,7 +3267,6 @@ clutter_stage_paint_to_buffer (ClutterStage *stage,
static void
capture_view_into (ClutterStage *stage,
gboolean paint,
ClutterStageView *view,
cairo_rectangle_int_t *rect,
uint8_t *data,
@ -3287,16 +3285,6 @@ capture_view_into (ClutterStage *stage,
framebuffer = clutter_stage_view_get_framebuffer (view);
if (paint)
{
cairo_region_t *region;
_clutter_stage_maybe_setup_viewport (stage, view);
region = cairo_region_create_rectangle (rect);
clutter_stage_do_paint_view (stage, view, region);
cairo_region_destroy (region);
}
view_scale = clutter_stage_view_get_scale (view);
texture_width = roundf (rect->width * view_scale);
texture_height = roundf (rect->height * view_scale);
@ -3322,7 +3310,6 @@ capture_view_into (ClutterStage *stage,
void
clutter_stage_capture_into (ClutterStage *stage,
gboolean paint,
cairo_rectangle_int_t *rect,
uint8_t *data)
{
@ -3351,7 +3338,7 @@ clutter_stage_capture_into (ClutterStage *stage,
x_offset = capture_rect.x - rect->x;
y_offset = capture_rect.y - rect->y;
capture_view_into (stage, paint, view,
capture_view_into (stage, view,
&capture_rect,
data + (x_offset * bpp) + (y_offset * stride),
stride);

View File

@ -492,7 +492,7 @@ meta_screen_cast_monitor_stream_src_record_to_buffer (MetaScreenCastStreamSrc *
monitor = get_monitor (monitor_src);
logical_monitor = meta_monitor_get_logical_monitor (monitor);
stage = get_stage (monitor_src);
clutter_stage_capture_into (stage, FALSE, &logical_monitor->rect, data);
clutter_stage_capture_into (stage, &logical_monitor->rect, data);
switch (meta_screen_cast_stream_get_cursor_mode (stream))
{