[mutter/wip/rstrode/rhel-8.0.0: 85/117] screen-cast: Fix monitor recording on HiDPI
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/rstrode/rhel-8.0.0: 85/117] screen-cast: Fix monitor recording on HiDPI
- Date: Sun, 17 Feb 2019 17:29:58 +0000 (UTC)
commit 18b68e3a84f367e28595e21cefcb9a117edf2bdf
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Jan 25 22:06:39 2019 +0100
screen-cast: Fix monitor recording on HiDPI
It scaled the logical monitor rect with scale to get the stream
dimensions, but that is only valid when having
'scale-monitor-framebuffers' enabled. Even when it was, it didn't work
properly, as clutter_stage_capture_into() doesn't work properly with
scaled monitor framebuffers yet.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/415
src/backends/meta-screen-cast-monitor-stream-src.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/meta-screen-cast-monitor-stream-src.c
b/src/backends/meta-screen-cast-monitor-stream-src.c
index 1d6aea242..138ea8183 100644
--- a/src/backends/meta-screen-cast-monitor-stream-src.c
+++ b/src/backends/meta-screen-cast-monitor-stream-src.c
@@ -102,7 +102,11 @@ meta_screen_cast_monitor_stream_src_get_specs (MetaScreenCastStreamSrc *src,
logical_monitor = meta_monitor_get_logical_monitor (monitor);
mode = meta_monitor_get_current_mode (monitor);
- scale = logical_monitor->scale;
+ if (meta_is_stage_views_scaled ())
+ scale = logical_monitor->scale;
+ else
+ scale = 1.0;
+
*width = (int) roundf (logical_monitor->rect.width * scale);
*height = (int) roundf (logical_monitor->rect.height * scale);
*frame_rate = meta_monitor_mode_get_refresh_rate (mode);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]