Commit Graph

218 Commits

Author SHA1 Message Date
Alexander Orzechowski ea40ba4f6a wlr_scene: Fix texture reuse
Add private interface to ignore a buffer that's locking a client_buffer
for damage tracking. This should eventually be replaced by wlr_raster.
2022-11-11 00:08:04 +00:00
Simon Ser 440d7fa072 scene: destroy addons before cleaning up internal state
This allows addons to access wlr_scene_node/wlr_scene_surface
fields to clean up themselves.
2022-11-08 16:47:59 +00:00
Simon Ser 24c149fefb scene: fix whitespace 2022-11-08 16:47:59 +00:00
Kirill Primak 123a08b448 scene: fix output damage expansion
This fixes e.g. `weston-simple-damage --use-viewport` which technically
renders at the buffer scale of 0.5.
2022-11-08 06:37:42 +00:00
Kirill Primak 92e3c5b798 scene: fix buffer source box transforming 2022-11-05 14:44:57 +03:00
Alexander Orzechowski c2d2773df5 wlr_scene: Handle fractional scaling better
Try to alleviate scaling inaccuracies by implementing a fudge factor.
2022-10-22 19:13:21 +00:00
Alexander Orzechowski c07424411a wlr_scene: Destroy the texture when setting a new buffer.
Fixes: https://github.com/labwc/labwc/issues/587
Fixes: f0e31e806f (wlr_scene: Fix not updating the scene node when setting a new buffer)
2022-10-14 20:11:28 +00:00
Alexander Orzechowski 5ba6cf517b wlr_scene: use wl_container_of() instead of casts 2022-10-13 16:36:05 +00:00
Alexander Orzechowski 99f55303aa wlr_scene: Apply source box translation 2022-10-10 08:09:55 +00:00
Alexander Orzechowski ceff381747 wlr_scene: Ignore disabled outputs 2022-10-10 08:09:55 +00:00
Alexander Orzechowski f0e31e806f wlr_scene: Fix not updating the scene node when setting a new buffer
If a new buffer is set for a buffer node, we must update the entire
node unconditionally if the buffer size changes, or the buffer is given
a buffer where it was previously NULL.

While we're here, let's avoid calling scene_node_update on just damage
updates. If the caller hasn't given us a damage region we just assume
the whole buffer.
2022-10-10 08:09:55 +00:00
Alexander Orzechowski dd9cfd3e2f wlr_scene: Be resilient against overflow conditions
If the area calculations for output overlap overflow a signed int, we
may not consider it to be a primary output. Turn this into an unsigned
type so this happens less frequently.
Additionally, it is possible the overflow would produce 0, we can handle
this by simply changing the comparison to more than or equal.

While we're here, let's assert that we always assign a primary output
if there are any intersecting outputs.
2022-10-10 08:09:55 +00:00
Alexander Orzechowski 2e06ff5688 wlr_scene: Clarify surface commit frame events 2022-09-05 08:24:50 +00:00
Alexander Orzechowski 35d94d779c wlr_scene: Consider screen position when culling background 2022-09-03 18:42:17 -04:00
Alexander Orzechowski 78cf39b6bd wlr_scene: Don't leak a region32 when texture failed to upload 2022-08-29 16:19:30 +00:00
Alexander Orzechowski fe9e193ab5 wlr_scene: More sanity checking
The render list should neither contain scene trees or null buffers.
2022-08-29 16:19:30 +00:00
Alexander Orzechowski fa7d2cb8d6 wlr_scene: Only consider visible parts of the node when culling background
Originally, I thought that we could safely subtract opaque regions
from the background even if the black rect optimization was kicking in.
This is wrong because a scene node that isn't fully occluded will still
appear in the render list even if its partially under a black rect. We
need to make sure that while culling the background, we only consider
opaque regions that are also visible. This will fix the black rect
optimization with the background.
2022-08-26 19:07:52 -04:00
yiqiang 6a11256cd0 scene/wlr_scene:fix judgment of invisible node 2022-08-26 22:19:22 +00:00
Alexander Orzechowski d3cb6b73a2 wlr_scene: Initialize region32 before trying to use it 2022-08-22 14:46:41 -04:00
Alexander Orzechowski 8bd7170fd9 Use env helpers 2022-08-22 10:18:52 -04:00
Alexander Orzechowski e7477c7114 wlr_scene: Improve awkward code style 2022-08-22 10:18:00 -04:00
Alexander Orzechowski 9bba4284e4 wlr_scene: Cull background
We don't need to worry about the black rect optimization here (that
always assumes that there will be a black background) because the
background is culled based on the render list. That means if a black rect
is removed, the visibility will reach all the way to the bottom forcing
the renderer to clear the area not breaking the assumption.
2022-08-22 10:17:59 -04:00
Alexander Orzechowski 6d1b8b376d wlr_scene: Only enable black rect optimization if culling is enabled
If culling is not enabled, there is no longer any guarantee that the
elements behind the rect won't be rendered. We must render the black rect
in all circumstances to cover up anything rendered.

This fixes the WLR_SCENE_DISABLE_VISIBILTY option.
2022-08-19 16:18:46 -04:00
Alexander Orzechowski 4d4f823263 wlr_scene: Simplify calculate_visibilty option 2022-08-19 16:18:11 -04:00
Kenny Levinsen 7c575922c0 wlr_scene: Convert render_list to wl_array
This simplifies some of the growth logic, but uses array_realloc to shrink the
array if needed.
2022-08-19 19:38:33 +02:00
Alexander Orzechowski ef4baea0e2 Use wl_signal_emit_mutable 2022-08-18 07:16:16 -04:00
yiqiang 3621c14b82 wlr_scene: fix color value when filtering black boxes
Signed-off-by: yiqiang <yiqiang@kylinos.cn>
2022-08-16 10:52:03 +08:00
Alexander Orzechowski bea4bd43e3 wlr_scene: Use wlr_box_equal 2022-08-15 07:37:09 -04:00
Alexander Orzechowski bcf7a79357 wlr_scene: Use wlr_fbox_equals 2022-08-15 06:14:59 -04:00
Alexander Orzechowski 919e67da7d wlr_scene: Account for occlusion by other scene nodes when calculating visibility 2022-08-14 02:38:51 -04:00
Alexander Orzechowski ce57485e6a wlr_scene: Calculate output intersections based on node visibility
This has a few benefits one of them crucial for proper operation:
 - The primary output will be based on the largest area that is actually
 visible to the user. Presentation and frame done events are based on
 this state. This is important to do since we cull frame done events.
 If we happen to be in a situation where a surface sits mostly on output
 A and some on output B but is completely obstructed by for instance a
 fullscreen surface on output A we will erroneously send frame_done
 events based on output A. If we base things as they are in reality
 (visibility) the primary output will instead be output B and things will
 work properly.
 - The primary output will be NULL if the surface is completely hidden.
 Due to quirks with wayland, on a surface commit, frame done events are
 required to be sent. Therefore, a new frame will be submitted for rendering
 on the primary output. We can improve adaptive sync on completely hidden
 but enabled surfaces if we null out the primary output in this state.
 - The client will be more likely to choose better metadata to use
 for rendering to an output's optimal rendering characteristics.
2022-08-14 02:38:51 -04:00
Alexander Orzechowski 342830e99c wlr_scene/surface: Hook through opaque metadata 2022-08-14 02:38:50 -04:00
Alexander Orzechowski 18417026be wlr_scene: Introduce buffer opaque region metadata 2022-08-14 02:38:50 -04:00
Alexander Orzechowski 0a9a941ba3 wlr_scene: Rewrite direct scan out logic to rely on visibility
Also make the regular rendering logic use the introduced
render list.
2022-08-14 02:38:50 -04:00
Alexander Orzechowski 14f4cfffba wlr_scene: Don't render non visible parts of textures/rects
We can also get rid of the intersection checks in the rendering functions
because we are guaranteed to already be in the node do to the prior
intersection checking of the node visibility.
2022-08-14 02:38:50 -04:00
Alexander Orzechowski d16d341381 wlr_scene: Only send frame done events for visible buffers 2022-08-14 02:38:50 -04:00
Alexander Orzechowski 6d62300324 wlr_scene_set_buffer_with_damage: Only damage the visible parts of the node 2022-08-14 02:38:50 -04:00
Alexander Orzechowski c6246272fd wlr_scene: Rework damage handling
Simplify damage handling by using our cached visibility state.
Damaging can happen in one step because since we can use the old visibility
state which represent what portions of the screen the scene node was. This
way we can damage everything in one step after the fact.
2022-08-14 02:38:50 -04:00
Alexander Orzechowski 028606512d wlr_scene: Add per scene node visibility 2022-08-14 01:39:20 -04:00
Alexander Orzechowski f411ca040e wlr_scene: Damage scene on node destroy by disabling node
This removes one trivial call of scene_node_damage_whole. It's easier
to disable the node later than it is to do the damage dance later.
2022-08-14 01:39:20 -04:00
Alexander Orzechowski 7f17774d18 wlr_scene: Introduce scene_nodes_in_box
Will query the scene for all nodes that appear in the given wlr_box.
The nodes will be sent to the iterator from closest to farthest from the
eye.

Refactor wlr_scene_node_at to use this new function.
2022-08-14 01:39:20 -04:00
Alexander Orzechowski f72aeacd6e wlr_scene: Add option to disable direct scanout
Closes: #3405
Supersedes: !3562

Co-authored-by: Xiao YaoBing <xiaoyaobing@qq.com>
2022-08-08 00:40:21 -04:00
Kenny Levinsen 3baf2a6bcf scene/layer_shell: Ignore unmapped exclusion zone
Only the exclusion zone for mapped layer shell surfaces should be respected. In
particular, a layer shell surface that was mapped with an exclusion zone but is
now unmapped should not adjust the usable area.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3471
2022-08-06 00:23:44 +02:00
Alexander Orzechowski 5dc1d4671d wlr_scene: Maintain damage highlight regions per output
The logic doesn't support handling multiple outputs so let's not break
the assumption and handle damages per output much like how damage_ring
is done.
2022-07-03 12:21:52 -04:00
Alexander Orzechowski fdfdd01a79 wlr_scene: Use direct assignment for damage indicator timestamps 2022-07-03 12:21:39 -04:00
Kirill Primak 694b8c6683 scene: add missing output damage listener
This is necessary to handle damage coming from the backend and software
cursors.
2022-06-29 21:19:38 +03:00
Kirill Primak 97f0347780 scene: switch to wlr_damage_ring 2022-06-29 18:54:27 +03:00
Johan Malm d57d2e0e36 scene/layer_shell_v1.c: fix bug in width/height calculations
...in wlr_scene_layer_surface_v1_configure()

Reproduce bug with waybar by setting `"margin": 5,`
in ~/.config/waybar/config. It will result in the right edge of the panel
extending outside the edge of the output.

The bug can also be reproduced with gtk-layer-demo by anchoring
left/right/top/bottom and setting respective margins

Relates-to: https://github.com/labwc/labwc/issues/382
2022-06-08 20:13:55 +00:00
Consolatis 0173275f7e scene/output_layout: Fix crash in scene_output_layout_output_destroy
Closes: #3448
2022-06-07 20:58:41 +02:00
Alexander Orzechowski cc5a02e75d wlr_scene_buffer: Update primary_output on output destroy 2022-06-02 10:33:04 -04:00
Alexander Orzechowski 4772eec93d wlr_scene_buffer: Call output enter/leave after primary_output calculation 2022-06-02 10:33:04 -04:00
Kirill Primak 1284f85da4 scene/output-layout: add initial outputs 2022-06-01 09:49:25 +00:00
Kirill Primak 0c2eed533e scene/output-layout: improve ownership logic
This commit ensures that outputs that weren't created by the output
layout helper aren't destroyed on the output layout change.

Consider the following piece of logic:

// struct wlr_output *o1, *o2;
// struct wlr_scene *scene;
// struct wlr_output_layout *layout;
wlr_scene_attach_output_layout(scene, layout);
wlr_output_layout_add_auto(layout, o1);
struct wlr_scene_output *so2 = wlr_scene_output_create(scene, o2);
wlr_output_layout_move(layout, o1, 100, 200);
// so2 is invalid now
2022-06-01 09:49:25 +00:00
Kirill Primak d3bc17d5d1 scene: add wlr_scene_output.events.destroy 2022-06-01 09:49:25 +00:00
Alexander Orzechowski 71f8a48d38 wlr_scene: Move children list from wlr_scene_node to wlr_scene_tree 2022-05-31 09:14:28 +00:00
Alexander Orzechowski cb2dbc327e wlr_scene: Inline wlr_scene_node_state
This seems like nothing interesting was done with this. Let's simplify
and allow us some flexibility in the future.
2022-05-31 09:14:28 +00:00
Alexander Orzechowski ccd0f85c2a wlr_scene: Only allow parenting on a wlr_scene_tree 2022-05-31 09:14:28 +00:00
Alexander Orzechowski 9eb71146ae wlr_scene: Refactor wlr_scene (the root element) to encase a wlr_scene_tree
Co-authored-by: Isaac Freund <mail@isaacfreund.com>
2022-05-31 09:14:28 +00:00
Consolatis 98c5f58a38 wlr_scene: Fix scaling with default source_box
Default to texture instead of destination_box geometry.
2022-05-30 16:17:31 +00:00
Kirill Primak 6f1fce9cb4 xdg-popup: use current/pending state pattern 2022-05-27 13:31:30 +00:00
Alexander Orzechowski 41124592dd wlr_scene: Hook up HIGHLIGHT logic
This will display red translucent rectangles on the screen regions that
have been damaged. These rectangles will fade out over the span of 250
msecs. If the area is damaged again while the region is fading out,
the timer is reset.

Let's also disable direct scan out when this option is enabled, or else
we won't be able to render the highlight damage regions.
2022-05-23 15:58:49 -04:00
Alexander Orzechowski b6fc882782 wlr_scene: Hook up RERENDER logic 2022-05-23 15:43:18 -04:00
Alexander Orzechowski 17f5414b1a wlr_scene: Parse out WLR_SCENE_DEBUG_DAMAGE 2022-05-23 15:43:18 -04:00
Kirill Primak ee122c9c2a scene/output: check for NULL in destructor 2022-05-23 07:33:49 +00:00
Alexander Orzechowski dc9bc5683a wlr_scene: Refactor wlr_scene_surface to be a helper on top of wlr_scene_buffer 2022-05-19 14:26:50 -04:00
Alexander Orzechowski 5f43e1732a wlr_scene: Introduce addons to scene nodes 2022-05-19 14:25:34 -04:00
Alexander Orzechowski 20cc1ce0b9 wlr_scene: Change out surface specific iterator functions
Instead iterate over wlr_scene_buffer
2022-05-19 14:24:05 -04:00
Alexander Orzechowski 5f56246571 wlr_scene: Pull scene_node_get_root into a private header
We will need this for surface emulation on buffers.
2022-05-19 14:24:05 -04:00
Alexander Orzechowski 39c059b70e wlr_scene: Make scene_buffer_from_node public 2022-05-19 14:24:05 -04:00
Alexander Orzechowski 73a656e8ac wlr_scene: Add a function to also specify damage when applying a buffer to wlr_scene_buffer 2022-05-19 14:24:05 -04:00
Alexander Orzechowski 34be5da072 wlr_scene: Add a way to choose when input interactions happen on a buffer 2022-05-19 14:24:05 -04:00
Alexander Orzechowski 09c7fe0f90 wlr_scene: Add frame_done signal for wlr_scene_buffer
Let's also change the name of the function. Motivation [1].

[1] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3496#note_1357824
2022-05-19 14:23:10 -04:00
Alexander Orzechowski a53eccf2af wlr_scene: Add primary_output property to wlr_scene_buffer 2022-05-19 14:21:22 -04:00
Alexander Orzechowski dfeb1309a8 wlr_scene: Add presentation signal for wlr_scene_buffer 2022-05-19 14:21:21 -04:00
Alexander Orzechowski 7e383c6a6a wlr_scene: Make wlr_scene_render_output private
This function sidesteps damage tracking and output awareness on
buffers/surfaces. This function isn't a great fit for the API.

Let's also inline the function and simplify it.
2022-05-19 14:17:51 -04:00
Alexander Orzechowski 933ff0e60c wlr_scene: Fix missing calls to scene_node_update_outputs
There were a couple places this was missing
 - on mode change of an output. If the resolution changes for example
   nodes may fall out of the view.
 - on commits on an output for scale or transform changes
 - when the transform of a buffer is changed. If the dest size is not
 set, the buffer may have been rotated potentially changing its size
 if the buffer width != height
2022-05-19 14:17:51 -04:00
Alexander Orzechowski c46b53d0b0 wlr_scene: Add output_enter/output_leave signals
When we destroy a scene buffer, let's make sure that we call
output_leave signals before we finish the node which will call destroy
listeners.
2022-05-19 14:17:51 -04:00
Alexander Orzechowski 6ddb9e51bd wlr_scene_output: Send output leave events before destroying the output 2022-05-19 14:17:51 -04:00
Alexander Orzechowski 61dab42c70 wlr_scene: Add setter for buffer of a wlr_scene_buffer 2022-05-19 14:17:51 -04:00
Alexander Orzechowski 039a31df9a wlr_scene: Allow buffer in wlr_scene_buffer to be NULL
This is useful to emulate an unmapped surface.
2022-05-19 14:16:52 -04:00
Simon Ser 6c350799b2 Zero-initialize structs in init functions
Ensures there is no field left to its previous undefined value after
calling an init function.
2022-04-28 10:09:50 +02:00
Kirill Primak 4ba8458255 scene/output-layout: fix scene destroy handler 2022-04-14 06:51:39 +00:00
Simon Ser 68f2f8cf92 Revert "scene: try to import buffers as textures before rendering"
This reverts commit 3db1bcbe64.

Since [1], importing buffers as textures before wlr_renderer_begin isn't
necessary anymore.

[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3464
2022-03-16 16:42:45 +00:00
Kenny Levinsen 1e3662ce57 scene: Add layer_shell_v1 helper
This helper behaves similar to the xdg_shell helper, and additionally
provides a little assistance for positioning and exclusive_zone
management.
2022-02-01 13:31:26 +01:00
Simon Ser 3db1bcbe64 scene: try to import buffers as textures before rendering
The wlroots APIs currently don't allow importing/uploading a buffer
during rendering operations. Scene-graph buffer nodes need to turn
their wlr_buffer into a wlr_texture at some point. It's not always
possible to do so at wlr_scene_buffer creation time because the
scene-graph may have zero outputs at this point, thus no way to
grab a wlr_renderer.

Instead, add scene-graph buffers to a pending list and try to import
them in wlr_scene_output_commit.

References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3354
2022-02-01 10:01:09 +00:00
Kirill Primak 617eb4fb93 surface: deprecate wlr_surface.h 2022-01-13 10:06:41 +00:00
Kirill Primak 83ab5055fd scene/subsurface_tree: fix handling subsurface destruction
This commit renames map/unmap listeners to clarify that they handle
subsurface events, and ensures the node is always destroyed before
the subsurface.

Without this patch, wl_list_remove() would operate on listener links in
already freed memory. glibc is usually lenient to bugs like this, but
musl isn't.
2022-01-08 16:09:27 +00:00
Simon Ser 812951f5bc scene: schedule an output frame on wl_surface.frame
Some clients (e.g. mpv, Firefox) request a new wl_surface.frame
callback without damaging their surface. When this happens,
schedule a new output frame.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3350
2021-12-23 17:00:28 +01:00
Isaac Freund 07ccc6e0b3
scene: add wlr_scene_set_presentation()
This helper automates sending presentation feedback to clients based on
the primary output of scene surfaces.
2021-12-14 21:34:02 +01:00
Isaac Freund 1c3e0816f3
scene: fix wlr_scene_send_frame_done() API
This doesn't work if scene outputs are not used as the primary output of
scene surfaces will always be NULL.

Therefore, take a wlr_scene_output instead of separate wlr_scene and
wlr_output arguments and rename the function to
wlr_scene_output_send_frame_done().

The actual behavior of the function is unchanged.
2021-12-13 17:26:22 +01:00
Isaac Freund fecde72be3 scene: add wlr_scene_send_frame_done() 2021-12-13 15:21:05 +00:00
Isaac Freund fb1f613510 scene: add primary output to wlr_scene_surface
This allows compositors to avoid sending multiple frame done events
to a surface that is rendered on multiple outputs at once. This may
also be used in the same way for presentation feedback.
2021-12-13 15:21:05 +00:00
Isaac Freund 0215dffba5 scene: send surface enter/leave output events
Co-authored-by: Simon Ser <contact@emersion.fr>
2021-12-13 15:21:05 +00:00
tiosgz ca1af8119c Fix wlr_scene_node_lower_to_bottom
Before this commit, it would keep the node at the top or make it second-
topmost.
2021-12-04 22:22:56 +00:00
Simon Ser ba974a4e9f scene: add wlr_scene_get_scene_output
This allows getting a wlr_scene_output from a wlr_output. Since an
output can only be added once to a scene-graph there's no ambiguity.

This is useful for compositors using wlr_scene_attach_output_layout:
the output layout integration automatically creates a scene-graph
output for each wlr_output added to the layout.
2021-11-30 20:16:24 +00:00
Simon Ser 254ab890e7 scene: add support for viewporter
If the surface has a source box set, use that.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3172
2021-11-26 19:31:19 +00:00
Simon Ser 585a908a01 scene: add wlr_scene_xdg_surface_create
This allows compositors to easily add an xdg_surface to the
scene-graph while retaining the ability to unconstraint popups
and decide their final position.

Compositors can handle new popups with the wlr_xdg_shell.new_surface
event, get the parent scene-graph node via wlr_xdg_popup.parent.data,
create a new scene-graph node via wlr_scene_xdg_surface_tree_create,
and unconstraint the popup if they want to.
2021-11-25 18:53:12 +01:00
Simon Zeni 5a98eae0dc types/wlr_scene: use renderer from wlr_output 2021-11-18 09:37:57 -05:00
Simon Ser eb5f23d6d0 scene: fix calloc size mismatch 2021-11-07 13:28:23 +01:00
tiosgz cc2ebd9fc0 scene/subsurface_tree: hide unmapped subsurfaces 2021-10-31 17:07:13 +01:00
Simon Ser a80f2b2816 scene: inline subsurface_tree_destroy
This is only called from one function.

To destroy the wlr_scene_subsurface_tree from elsewhere, callers
can destroy the scene-graph node returned by
wlr_scene_subsurface_tree_create instead (just like a compositor
would do). subsurface_tree_handle_surface_destroy does exactly this.

Inlining avoids calling subsurface_tree_destroy by mistake.
2021-10-27 16:18:10 +02:00
Simon Ser a4ccca0834 scene: add support for direct scan-out
Check if only a single node intersects with the output viewport
and all of its properties match. In this case, attempt direct
scan-out.
2021-10-23 00:49:07 +02:00
Simon Ser db4c93028d scene: add wlr_scene_output_for_each_surface
This allows compositors to more easily implement sending
wl_surface.frame callback done events.
2021-10-22 22:29:35 +02:00
Simon Ser f7ea33da0a scene: remove surface commit listener when node is destroyed 2021-10-18 16:25:19 +02:00
Isaac Freund 4fae8f7be3 scene: add functions to place node on top/bottom
These are very common operations for compositors (including tinywl)
to perform.
2021-10-14 21:10:03 +02:00
Isaac Freund 2a8d385386 scene: assert that node != sibling in place above/below
Currently these functions remove the node from the scene if the sibling
argument is the same node as the node. To prevent confusion when
misusing this API, assert that the nodes are distinct and document this.
2021-10-14 21:10:03 +02:00
Simon Ser 3c26244340 scene: add wlr_scene_buffer_set_transform 2021-09-22 10:45:39 -06:00
Simon Ser 43833fba64 scene: add wlr_scene_buffer_set_dest_size 2021-09-22 10:45:39 -06:00
Simon Ser 3d4afbe945 scene: use scene_node_get_size in wlr_scene_node_at
This allows to unify the RECT and BUFFER code-paths. The BUFFER one
will become more complicated with destination size and transforms.
2021-09-22 10:45:39 -06:00
Simon Ser 27b529f8a0 scene: add scene_node_get_size helper 2021-09-22 10:45:39 -06:00
Simon Ser 63040d6744 scene: add wlr_scene_buffer_set_source_box 2021-09-22 10:45:39 -06:00
Simon Ser 7939bf8cc6 scene: add wlr_scene_buffer
This new scene-graph node displays a wlr_buffer.

Closes: https://github.com/swaywm/wlroots/issues/3161
2021-09-22 10:45:39 -06:00
Simon Ser f6f0e010d1 scene: unify intersection logic in wlr_scene_node_at
Let's extract the common bits.
2021-09-22 10:45:39 -06:00
Simon Ser b25759cd20 scene: drop default case in wlr_scene_node_at
This allows the compiler to error out if we haven't enumerated all
of the cases. This is useful to avoid a missing implementation when
adding a new node type.
2021-09-22 10:45:39 -06:00
Simon Ser 2e590026e9 scene: add wlr_scene_subsurface_tree_create 2021-09-21 16:48:31 +02:00
Simon Ser 211b3b760e scene: add wlr_scene_tree 2021-09-21 16:48:31 +02:00
Simon Ser a181a37b12 scene: add wlr_scene_attach_output_layout
This is a helper to integrate wlr_scene with wlr_output_layout.
2021-09-09 12:04:35 +02:00
Simon Ser 7832005a1f scene: move source to subdir
This will allow more scene-graph extensions to be added without
cluttering wlr_scene.c, for instance for sub-surface handling and
wlr_output_layout integration.
2021-09-09 12:04:35 +02:00