summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-07-11added more scene dependencies, added tinywlWilliam McKinnon
2023-07-10Add 'tinywl/' from commit 'f8b869bd19c1b128fd3a4d5005abd297b07045c4'William McKinnon
git-subtree-dir: tinywl git-subtree-mainline: 79d7bc73d1f1540efb4f7c50bcbfff1113374b36 git-subtree-split: f8b869bd19c1b128fd3a4d5005abd297b07045c4
2023-07-10Add 'src/' from commit '43b5ef7c24123234d2102d11d0344caff4da5dec'William McKinnon
git-subtree-dir: src git-subtree-mainline: a1d31571adce4152dcbeff409b0a9da97e5fbbac git-subtree-split: 43b5ef7c24123234d2102d11d0344caff4da5dec
2023-07-10initial commit: license + gitignore + editorconfigWilliam McKinnon
2022-12-08wlr_scene: Expand damage cull region with fractional scalesAlexander Orzechowski
(cherry picked from commit 32d00984e19b494c1f9fb04d6064777bc42ed943)
2022-12-07scene: fix output damage expansion conditionKirill Primak
Now, it is checked whether an output pixel corresponds to an integer number of buffer pixels; if it doesn't, the region is altered to take this into account. (cherry picked from commit 5477ad7d9079c59d64fed9acb98ccccebc24af93)
2022-11-29scene/layer_shell_v1.c: remove redundant commentJohan Malm
(cherry picked from commit 338e0a3976f2bad5ec048b022648a671ed443b4f)
2022-11-29scene/layer_shell_v1.c: set exclusive zone correctlyJohan Malm
...when only one edge is anchored. The layer-shell protocol specifies that a positive exclusive-zone value is 'meaningful' if the surface is anchored to either: 1. one edge 2. one edge and both perpendicular edges. For example, if you wish to position a layer-shell client along the top edge and make it exclusive, you should be able to either set anchor=TOP or anchor=TOP|LEFT|RIGHT. It appears that many panels/bars use the latter approach (anchor to an edge and also both perpendicular edges) which is probably why this has not been reported previously. This patch adds support for the first case and thereby makes exclusive zone behaviour consistent with the protocol and also with sway's extant layer-shell implementation. (cherry picked from commit 8e80432a72b18a1ddbacdb08ff0c41645578f1ee)
2022-11-11wlr_scene: Remove duplicate buffer check when submitting a new bufferAlexander Orzechowski
wlr_buffer allows mutation during its lifetime. This happens for wlr_client_buffer which fixes damage tracking issues.
2022-11-11wlr_scene: Fix texture reuseAlexander Orzechowski
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-08scene: destroy addons before cleaning up internal stateSimon Ser
This allows addons to access wlr_scene_node/wlr_scene_surface fields to clean up themselves.
2022-11-08scene: fix whitespaceSimon Ser
2022-11-08scene: fix output damage expansionKirill Primak
This fixes e.g. `weston-simple-damage --use-viewport` which technically renders at the buffer scale of 0.5.
2022-11-07tinywl: handle view unmap while grabbedKirill Primak
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3372
2022-11-05scene: fix buffer source box transformingKirill Primak
2022-10-22wlr_scene: Handle fractional scaling betterAlexander Orzechowski
Try to alleviate scaling inaccuracies by implementing a fudge factor.
2022-10-14wlr_scene: Destroy the texture when setting a new buffer.Alexander Orzechowski
Fixes: https://github.com/labwc/labwc/issues/587 Fixes: f0e31e806f7cb88c9d55dc0eb1876c86600d28df (wlr_scene: Fix not updating the scene node when setting a new buffer)
2022-10-13wlr_scene: use wl_container_of() instead of castsAlexander Orzechowski
2022-10-10wlr_scene: Apply source box translationAlexander Orzechowski
2022-10-10wlr_scene: Ignore disabled outputsAlexander Orzechowski
2022-10-10wlr_scene: Fix not updating the scene node when setting a new bufferAlexander Orzechowski
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-10wlr_scene: Be resilient against overflow conditionsAlexander Orzechowski
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-09-05wlr_scene: Clarify surface commit frame eventsAlexander Orzechowski
2022-09-03wlr_scene: Consider screen position when culling backgroundAlexander Orzechowski
2022-08-29wlr_scene: Don't leak a region32 when texture failed to uploadAlexander Orzechowski
2022-08-29wlr_scene: More sanity checkingAlexander Orzechowski
The render list should neither contain scene trees or null buffers.
2022-08-26wlr_scene: Only consider visible parts of the node when culling backgroundAlexander Orzechowski
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-26scene/wlr_scene:fix judgment of invisible nodeyiqiang
2022-08-22wlr_scene: Initialize region32 before trying to use itAlexander Orzechowski
2022-08-22Use env helpersAlexander Orzechowski
2022-08-22wlr_scene: Improve awkward code styleAlexander Orzechowski
2022-08-22wlr_scene: Cull backgroundAlexander Orzechowski
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-19wlr_scene: Only enable black rect optimization if culling is enabledAlexander Orzechowski
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-19wlr_scene: Simplify calculate_visibilty optionAlexander Orzechowski
2022-08-19wlr_scene: Convert render_list to wl_arrayKenny Levinsen
This simplifies some of the growth logic, but uses array_realloc to shrink the array if needed.
2022-08-18Use wl_signal_emit_mutableAlexander Orzechowski
2022-08-16wlr_scene: fix color value when filtering black boxesyiqiang
Signed-off-by: yiqiang <[email protected]>
2022-08-15wlr_scene: Use wlr_box_equalAlexander Orzechowski
2022-08-15wlr_scene: Use wlr_fbox_equalsAlexander Orzechowski
2022-08-14wlr_scene: Account for occlusion by other scene nodes when calculating ↵Alexander Orzechowski
visibility
2022-08-14wlr_scene: Calculate output intersections based on node visibilityAlexander Orzechowski
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-14wlr_scene/surface: Hook through opaque metadataAlexander Orzechowski
2022-08-14wlr_scene: Introduce buffer opaque region metadataAlexander Orzechowski
2022-08-14wlr_scene: Rewrite direct scan out logic to rely on visibilityAlexander Orzechowski
Also make the regular rendering logic use the introduced render list.
2022-08-14wlr_scene: Don't render non visible parts of textures/rectsAlexander Orzechowski
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-14wlr_scene: Only send frame done events for visible buffersAlexander Orzechowski
2022-08-14wlr_scene_set_buffer_with_damage: Only damage the visible parts of the nodeAlexander Orzechowski
2022-08-14wlr_scene: Rework damage handlingAlexander Orzechowski
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-14wlr_scene: Add per scene node visibilityAlexander Orzechowski
2022-08-14wlr_scene: Damage scene on node destroy by disabling nodeAlexander Orzechowski
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.