mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
clutter: Make stage capture support fractional scaling
This commit adds scaling support to clutter_stage_capture_into, which is currently used when screencasting monitors. This is supposed to fix graphical issues that arise when using fractional scaling. Fixes #1131 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1855>
This commit is contained in:
@ -528,11 +528,18 @@ meta_screen_cast_monitor_stream_src_record_to_buffer (MetaScreenCastStreamSrc *
|
||||
ClutterStage *stage;
|
||||
MetaMonitor *monitor;
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
float scale;
|
||||
|
||||
monitor = get_monitor (monitor_src);
|
||||
logical_monitor = meta_monitor_get_logical_monitor (monitor);
|
||||
stage = get_stage (monitor_src);
|
||||
clutter_stage_capture_into (stage, &logical_monitor->rect, data);
|
||||
|
||||
if (meta_is_stage_views_scaled ())
|
||||
scale = meta_logical_monitor_get_scale (logical_monitor);
|
||||
else
|
||||
scale = 1.0;
|
||||
|
||||
clutter_stage_capture_into (stage, &logical_monitor->rect, scale, data, stride);
|
||||
|
||||
switch (meta_screen_cast_stream_get_cursor_mode (stream))
|
||||
{
|
||||
|
Reference in New Issue
Block a user