wlroots/types/meson.build
Furkan Sahin 53b399d054 ext_image_capture_source_v1: add scene-per-output capture source
When a compositor uses color transforms (ICC profiles) the output's
postrender buffer is in the display's color space, not sRGB. A
screenshot client receives this buffer and saves it as an untagged PNG,
which appears oversaturated in non-colormanaged viewers.

To fix this without altering the semantics of the raw output source
(which must deliver the exact hardware scanned buffer, including
overlays and direct scanout), add an optional, compositor driven
scene-per-output capture source. This source re-renders the entire scene
graph for a given output with an identity color transform (sRGB), using
a hidden headless output to avoid flicker.

The new function
`wlr_ext_image_capture_source_v1_create_with_scene_output()` takes a
wlr_scene, a reference wlr_output (for dimensions, scale,
renderer/allocator), and an optional wlr_output_layout (for correct
positioning). The source is created on demand in the existing output
capture manager when the compositor has called
`wlr_ext_output_image_capture_source_manager_v1_set_scene()` and
`wlr_ext_output_image_capture_source_manager_v1_set_layout()`.

If the compositor never provides a scene, the manager continues to
create the original raw output source, preserving backward compatibility
and hardware plane capture for compositors that need it.
2026-06-01 12:39:05 -04:00

119 lines
3.1 KiB
Meson

wlr_files += files(
'data_device/wlr_data_device.c',
'data_device/wlr_data_offer.c',
'data_device/wlr_data_source.c',
'data_device/wlr_drag.c',
'ext_image_capture_source_v1/base.c',
'ext_image_capture_source_v1/output.c',
'ext_image_capture_source_v1/foreign_toplevel.c',
'ext_image_capture_source_v1/scene.c',
'ext_image_capture_source_v1/scene_output.c',
'output/cursor.c',
'output/output.c',
'output/render.c',
'output/state.c',
'output/swapchain.c',
'scene/drag_icon.c',
'scene/subsurface_tree.c',
'scene/surface.c',
'scene/wlr_scene.c',
'scene/output_layout.c',
'scene/xdg_shell.c',
'scene/layer_shell_v1.c',
'seat/wlr_seat_keyboard.c',
'seat/wlr_seat_pointer.c',
'seat/wlr_seat_touch.c',
'seat/wlr_seat.c',
'tablet_v2/wlr_tablet_v2_pad.c',
'tablet_v2/wlr_tablet_v2_tablet.c',
'tablet_v2/wlr_tablet_v2_tool.c',
'tablet_v2/wlr_tablet_v2.c',
'xdg_shell/wlr_xdg_popup.c',
'xdg_shell/wlr_xdg_positioner.c',
'xdg_shell/wlr_xdg_shell.c',
'xdg_shell/wlr_xdg_surface.c',
'xdg_shell/wlr_xdg_toplevel.c',
'buffer/buffer.c',
'buffer/client.c',
'buffer/dmabuf.c',
'buffer/readonly_data.c',
'buffer/resource.c',
'wlr_alpha_modifier_v1.c',
'wlr_color_management_v1.c',
'wlr_color_representation_v1.c',
'wlr_compositor.c',
'wlr_content_type_v1.c',
'wlr_cursor.c',
'wlr_cursor_shape_v1.c',
'wlr_damage_ring.c',
'wlr_data_control_v1.c',
'wlr_drm.c',
'wlr_export_dmabuf_v1.c',
'wlr_ext_background_effect_v1.c',
'wlr_ext_data_control_v1.c',
'wlr_ext_foreign_toplevel_list_v1.c',
'wlr_ext_image_copy_capture_v1.c',
'wlr_ext_workspace_v1.c',
'wlr_fixes.c',
'wlr_foreign_toplevel_management_v1.c',
'wlr_fractional_scale_v1.c',
'wlr_gamma_control_v1.c',
'wlr_idle_inhibit_v1.c',
'wlr_idle_notify_v1.c',
'wlr_input_device.c',
'wlr_input_method_v2.c',
'wlr_keyboard.c',
'wlr_keyboard_group.c',
'wlr_keyboard_shortcuts_inhibit_v1.c',
'wlr_layer_shell_v1.c',
'wlr_linux_dmabuf_v1.c',
'wlr_linux_drm_syncobj_v1.c',
'wlr_output_layer.c',
'wlr_output_layout.c',
'wlr_output_management_v1.c',
'wlr_output_power_management_v1.c',
'wlr_output_swapchain_manager.c',
'wlr_pointer_constraints_v1.c',
'wlr_pointer_gestures_v1.c',
'wlr_pointer_warp_v1.c',
'wlr_pointer.c',
'wlr_presentation_time.c',
'wlr_primary_selection_v1.c',
'wlr_primary_selection.c',
'wlr_region.c',
'wlr_relative_pointer_v1.c',
'wlr_screencopy_v1.c',
'wlr_security_context_v1.c',
'wlr_server_decoration.c',
'wlr_session_lock_v1.c',
'wlr_shm.c',
'wlr_single_pixel_buffer_v1.c',
'wlr_subcompositor.c',
'wlr_switch.c',
'wlr_tablet_pad.c',
'wlr_tablet_tool.c',
'wlr_tearing_control_v1.c',
'wlr_text_input_v3.c',
'wlr_touch.c',
'wlr_transient_seat_v1.c',
'wlr_viewporter.c',
'wlr_virtual_keyboard_v1.c',
'wlr_virtual_pointer_v1.c',
'wlr_xcursor_manager.c',
'wlr_xdg_activation_v1.c',
'wlr_xdg_decoration_v1.c',
'wlr_xdg_dialog_v1.c',
'wlr_xdg_foreign_v1.c',
'wlr_xdg_foreign_v2.c',
'wlr_xdg_foreign_registry.c',
'wlr_xdg_output_v1.c',
'wlr_xdg_system_bell_v1.c',
'wlr_xdg_toplevel_icon_v1.c',
'wlr_xdg_toplevel_tag_v1.c',
)
if features.get('drm-backend')
wlr_files += files(
'wlr_drm_lease_v1.c',
)
endif