mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
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:
parent
662e29990a
commit
1d4e535e7a
@ -51,7 +51,6 @@ int64_t clutter_stage_get_frame_counter (ClutterStage *stage);
|
|||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_stage_capture_into (ClutterStage *stage,
|
void clutter_stage_capture_into (ClutterStage *stage,
|
||||||
gboolean paint,
|
|
||||||
cairo_rectangle_int_t *rect,
|
cairo_rectangle_int_t *rect,
|
||||||
uint8_t *data);
|
uint8_t *data);
|
||||||
|
|
||||||
|
@ -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_queue_redraw_entry (QueueRedrawEntry *entry);
|
||||||
static void free_pointer_device_entry (PointerDeviceEntry *entry);
|
static void free_pointer_device_entry (PointerDeviceEntry *entry);
|
||||||
static void capture_view_into (ClutterStage *stage,
|
static void capture_view_into (ClutterStage *stage,
|
||||||
gboolean paint,
|
|
||||||
ClutterStageView *view,
|
ClutterStageView *view,
|
||||||
cairo_rectangle_int_t *rect,
|
cairo_rectangle_int_t *rect,
|
||||||
uint8_t *data,
|
uint8_t *data,
|
||||||
@ -3268,7 +3267,6 @@ clutter_stage_paint_to_buffer (ClutterStage *stage,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
capture_view_into (ClutterStage *stage,
|
capture_view_into (ClutterStage *stage,
|
||||||
gboolean paint,
|
|
||||||
ClutterStageView *view,
|
ClutterStageView *view,
|
||||||
cairo_rectangle_int_t *rect,
|
cairo_rectangle_int_t *rect,
|
||||||
uint8_t *data,
|
uint8_t *data,
|
||||||
@ -3287,16 +3285,6 @@ capture_view_into (ClutterStage *stage,
|
|||||||
|
|
||||||
framebuffer = clutter_stage_view_get_framebuffer (view);
|
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);
|
view_scale = clutter_stage_view_get_scale (view);
|
||||||
texture_width = roundf (rect->width * view_scale);
|
texture_width = roundf (rect->width * view_scale);
|
||||||
texture_height = roundf (rect->height * view_scale);
|
texture_height = roundf (rect->height * view_scale);
|
||||||
@ -3322,7 +3310,6 @@ capture_view_into (ClutterStage *stage,
|
|||||||
|
|
||||||
void
|
void
|
||||||
clutter_stage_capture_into (ClutterStage *stage,
|
clutter_stage_capture_into (ClutterStage *stage,
|
||||||
gboolean paint,
|
|
||||||
cairo_rectangle_int_t *rect,
|
cairo_rectangle_int_t *rect,
|
||||||
uint8_t *data)
|
uint8_t *data)
|
||||||
{
|
{
|
||||||
@ -3351,7 +3338,7 @@ clutter_stage_capture_into (ClutterStage *stage,
|
|||||||
x_offset = capture_rect.x - rect->x;
|
x_offset = capture_rect.x - rect->x;
|
||||||
y_offset = capture_rect.y - rect->y;
|
y_offset = capture_rect.y - rect->y;
|
||||||
|
|
||||||
capture_view_into (stage, paint, view,
|
capture_view_into (stage, view,
|
||||||
&capture_rect,
|
&capture_rect,
|
||||||
data + (x_offset * bpp) + (y_offset * stride),
|
data + (x_offset * bpp) + (y_offset * stride),
|
||||||
stride);
|
stride);
|
||||||
|
@ -492,7 +492,7 @@ meta_screen_cast_monitor_stream_src_record_to_buffer (MetaScreenCastStreamSrc *
|
|||||||
monitor = get_monitor (monitor_src);
|
monitor = get_monitor (monitor_src);
|
||||||
logical_monitor = meta_monitor_get_logical_monitor (monitor);
|
logical_monitor = meta_monitor_get_logical_monitor (monitor);
|
||||||
stage = get_stage (monitor_src);
|
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))
|
switch (meta_screen_cast_stream_get_cursor_mode (stream))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user