Commit graph

12 commits

Author SHA1 Message Date
Simon Ser
5717e27c06 output: take wl_display in wlr_output_create_global()
Currently wlr_output holds a wl_display, but it will go away soon.
Instead of relying on that field in wlr_output_create_global(),
make the dependency explicit by taking a wl_display as argument.
2023-11-23 11:39:25 +00:00
Simon Ser
2aabaf8809 examples: enable new outputs 2023-06-27 16:26:30 +00:00
Simon Ser
be05097968 output: add wlr_output_state_init()
This changes the semantics of wlr_output_state. Instead of having
fields with uninitialized memory when missing from the committed
bitflag, all fields are always initialized (and maybe NULL/empty),
just like we do in wlr_surface_state. This reduces the chances of
footguns when reading a field, and removes the need to check for
the committed bitfield everywhere.

A new wlr_output_state_init() function takes care of initializing
the Pixman region.
2023-06-23 18:07:26 +00:00
Simon Ser
670915eeea output: add wlr_output_state_set_layers() 2023-06-13 12:02:49 +00:00
Alexander Orzechowski
495bcbeedd examples: Drop usage of wlr_output.pending 2023-06-13 09:19:51 +00:00
Simon Ser
ac426c0c24 examples/output-layers: fix layers not included in commit
wlr_output_set_layers() attaches layers to the output's pending
state, but then uses a detached wlr_output_state in
wlr_output_state_commit(). This results in layers being left out
of the committed state.

Fixes: 8e81b4bb42 ("examples: convert to new rendering API")
2023-06-12 21:52:16 +00:00
Rose Hudson
9e8947e4d5 add render timer API
Based on five calls:
wlr_render_timer_create - creates a timer which can be reused across
  frames on the same renderer
wlr_renderer_begin_buffer_pass - now takes a timer so that backends can
  record when the rendering starts and finishes
wlr_render_timer_get_time - should be called as late as possible so that
  queries can make their way back from the GPU
wlr_render_timer_destroy - self-explanatory

The timer is exposed as an opaque `struct wlr_render_timer` so that
backends can store whatever they want in there.
2023-06-05 19:50:07 +00:00
Simon Ser
8e81b4bb42 examples: convert to new rendering API
Left out multi-pointer (will be removed) and quads (requires
arbitrary rotation).
2023-05-30 16:18:19 +00:00
Simon Ser
0bb574239d compositor: pass version in wlr_compositor_create
This allows wlroots to support newer versions of the interface
without breaking the API.
2023-04-14 17:07:26 +02:00
Simon Ser
835208db98 output-layer: add support for scaling buffers
This allows callers to set a destination size different from the
buffer size to scale them.

The DRM backend supports this. The Wayland backend doesn't yet
(we'd need to wire up viewporter).
2023-04-04 19:39:38 +02:00
Simon Ser
9a425841b0 examples/output-layers: relay feedback events 2023-02-20 18:38:57 +01:00
Simon Ser
c3d969d2d4 examples/output-layers: new example 2023-02-20 18:38:57 +01:00