wlroots/types
David Turner 792bee9657 scene: Optimize rendering of single-pixel buffers
The single-pixel buffer protocol is used to allow wayland clients to
easily draw solid-color rectangles by presenting a 1x1-pixel buffer and
scaling it to the desired size.  This patch improves how these buffers
are then handled in the scene-tree renderer.

We already ignore opaque black rectangles at the very bottom (and
anything under them) because we assume we'll be rendering on a black
background.  This patch detects black opaque single-pixel buffers and
handles them in the same way as black opaque rectangles.  It also
renders single-pixel buffers as rectangles rather than buffers because
this is probably more efficient in the underlying renderer.

In wlr_scene_surface we cache whether the attached buffer is a
single-pixel buffer.  This is done because the
wlr_single_pixel_buffer_v1 will be destroyed after texture upload, after
which it becomes much more annoying to check if the buffer is a
single-pixel buffer.
2025-04-07 13:28:51 +01:00
..
buffer buffer: Make wlr_buffer_is_opaque public 2025-01-25 23:42:49 +01:00
data_device Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
ext_image_capture_source_v1 ext_image_capture_source_v1: remove unused wlr_renderer include 2025-03-31 17:42:00 +08:00
output output: don't update disabled cursor texture 2025-03-06 13:55:53 +00:00
scene scene: Optimize rendering of single-pixel buffers 2025-04-07 13:28:51 +01:00
seat seat: Don't forget to destroy touch points on touch up 2025-02-13 16:41:05 +00:00
tablet_v2 Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
xdg_shell xdg-shell,layer-shell: assert that configure events are only sent to initialized surfaces 2025-03-01 16:07:11 +00:00
meson.build meson: add a missing src file 2025-04-01 11:41:56 +00:00
wlr_alpha_modifier_v1.c alpha-modifier-v1: add a missing NULL check in wlr_alpha_modifier_v1_get_surface_state() 2024-05-01 03:07:16 +03:00
wlr_color_management_v1.c color-management-v1: add setter for surface feedback 2025-03-30 16:31:44 +02:00
wlr_compositor.c buffer: Make wlr_buffer_is_opaque public 2025-01-25 23:42:49 +01:00
wlr_content_type_v1.c content-type-v1: use wlr_surface_synced 2023-12-25 11:47:15 +01:00
wlr_cursor.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_cursor_shape_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_damage_ring.c damage_ring: Remove wlr_damage_ring_set_bounds 2024-10-09 06:31:46 +00:00
wlr_data_control_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_drm.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_drm_lease_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_export_dmabuf_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_ext_data_control_v1.c ext-data-control: add missing listener list assertion 2025-04-06 10:13:40 +03:00
wlr_ext_foreign_toplevel_list_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_ext_image_copy_capture_v1.c Remove all calls to pixman_region32_not_empty() 2025-01-29 23:37:06 +01:00
wlr_foreign_toplevel_management_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_fractional_scale_v1.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
wlr_gamma_control_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_idle_inhibit_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_idle_notify_v1.c Implement updated version of ext-idle-notify protocol 2025-02-14 18:57:37 +00:00
wlr_input_device.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_input_method_v2.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_keyboard.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_keyboard_group.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_keyboard_shortcuts_inhibit_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_layer_shell_v1.c xdg-shell,layer-shell: assert that configure events are only sent to initialized surfaces 2025-03-01 16:07:11 +00:00
wlr_linux_dmabuf_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_linux_drm_syncobj_v1.c Fix includes of wlr_output.h 2025-02-21 13:44:42 +00:00
wlr_output_layer.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_output_layout.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_output_management_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_output_power_management_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_output_swapchain_manager.c swapchain, damage_ring: Drop buffer age 2024-08-21 09:45:54 -04:00
wlr_pointer.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_pointer_constraints_v1.c Remove all calls to pixman_region32_not_empty() 2025-01-29 23:37:06 +01:00
wlr_pointer_gestures_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_presentation_time.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_primary_selection.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_primary_selection_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_region.c compositor: deprecate wlr/types/wlr_region.h 2023-11-24 15:09:31 +03:00
wlr_relative_pointer_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_screencopy_v1.c screencopy-v1: drop output_enable listener 2025-03-10 15:33:46 +08:00
wlr_security_context_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_server_decoration.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_session_lock_v1.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
wlr_shm.c buffer: introduce wlr_buffer_finish() 2025-01-08 16:06:12 +00:00
wlr_single_pixel_buffer_v1.c single-pixel-buffer: Add try_from_buffer() function 2025-04-07 13:25:42 +01:00
wlr_subcompositor.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_switch.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_tablet_pad.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_tablet_tool.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_tearing_control_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_text_input_v3.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_touch.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_transient_seat_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_viewporter.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_virtual_keyboard_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_virtual_pointer_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_xcursor_manager.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
wlr_xdg_activation_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_xdg_decoration_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_xdg_dialog_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_xdg_foreign_registry.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_xdg_foreign_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_xdg_foreign_v2.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_xdg_output_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_xdg_system_bell_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00
wlr_xdg_toplevel_icon_v1.c Assert (almost all) signals have no attached listeners on destroy 2025-01-15 19:53:11 +03:00