Age | Commit message (Collapse) | Author |
|
|
|
A saner replacement for wlr_cursor_set_image():
- Takes a wlr_buffer instead of numerous parameters and a hardcoded
format.
- The scale is not used to filter outputs.
- A ref to the buffer is kept to apply it to new outputs.
|
|
|
|
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3593
|
|
The sway scene port relies on this to create a copy of the buffer for
saved surface purposes.
|
|
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.
|
|
Call wlr_surface_destroy_role_object() when the role_resource is
destroyed.
|
|
This increases type safety, makes it more obvious that role_data
must represent the role object, and will allow for automatic
cleanup when the resource is destroyed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Now that we are dynamically creating pipeline layouts, we need separate
texture views for each pipeline layout we choose to use with a texture.
|
|
These will happen lazily when pipelines get created.
|
|
This will become necessary when we switch away from scissoring. For the
time being, this cleans things up a bit and allows for a trivial
blending implementation for textures when that comes.
|
|
|
|
If we ever wanted to handle dynamic state that requires new pipelines
such as using different texture filters those can be added here with more
ease.
|
|
It's pretty awkward to call wlr_cursor_set_image() with 6 zeroes.
Hide that awkwardness in wlroots.
|
|
This keeps track of the last set XCursor. If it hasn't changed,
skip the texture upload.
In the future, support for animated XCursors can be added.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3436
|
|
|
|
This commit allows to make a role as not represented by an object,
which fixes calling role commit handlers for roles like cursor
surfaces.
Fixes: 099b9de752f9cc212140533a8a2e20b31aa9028f
|
|
|
|
The kernel complains when the damage exceeds the FB bounds:
[73850.448326] i915 0000:00:02.0: [drm:drm_atomic_check_only] [PLANE:31:plane 1A] invalid damage clip 0 0 2147483647 2147483647
Make the DRM backend behave like the Wayland one and allow compositors
to damage (0, 0, INT32_MAX, INT32_MAX) to repaint everything without
needing to know the exact buffer size.
Closes: https://github.com/swaywm/sway/issues/7632
|
|
|
|
|
|
|
|
Make the compositor responsible for doing that, so that they can
properly integrate with their output commit sequence.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Currently, an icon surface's role_data is set manually to a struct
wlr_drag_icon, which is hacky, incorrect (as role_data is supposed
to be the surface's role object, and drag icons don't have them), and
will be disallowed by future changes.
|
|
We don't need to mutate the event in this function.
|
|
|
|
|
|
|
|
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.
|
|
|
|
Use the viewporter protocol to scale output layers.
|
|
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3654
|
|
Many issues here:
- wlr_output_cursor_set_buffer() takes a buffer already scaled for
the output, not a buffer with scale=1.
- wlr_output_cursor.{width,height,hotspot_x,hotspot_y} are in output
buffer coordinates.
- render_cursor_buffer() had hardcoded no-ops for scale and
transform, instead of using the cursor surface's.
Fixes: b64e7e88bfb8 ("output: add output_cursor_set_texture()")
|
|
|
|
It was previously used to handle unmapping properly but is obsolete now.
|
|
|
|
|