aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/render.c
Commit message (Collapse)AuthorAge
* renderer: Remove in favor of scene_graphLibravatar Alexander Orzechowski2024-01-18
|
* seat: Remove dead seatop_render functionLibravatar Alexander Orzechowski2024-01-18
|
* scene_graph: Port ext_session_v1Libravatar Alexander Orzechowski2024-01-18
|
* scene_graph: Port seat drag iconsLibravatar Alexander Orzechowski2024-01-18
|
* desktop: Rename layers to shell_layersLibravatar Alexander Orzechowski2024-01-18
| | | | | This code will be deleted later, but for the time being rename it so it doesn't conflict with future properties.
* Chase wlroots!4482Libravatar Bill Li2023-12-27
|
* Add wlr/util/transform.h includesLibravatar Simon Ser2023-11-23
| | | | | References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4097 Closes: https://github.com/swaywm/sway/issues/7830
* chase wlroots 'presentation-time: add separate helper for zero-copy 'Libravatar Artturin2023-07-15
| | | | https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/67447d6cb407ac5b6405b4dbae01a38567feb111
* render: Use wlroots scale filterLibravatar Alexander Orzechowski2023-06-19
|
* chore: chase wlroots map logic unificationLibravatar Kirill Primak2023-06-02
|
* render: fix titlebar texture clippingLibravatar Simon Ser2023-05-09
| | | | | | | We need to provide an unclipped dst_box. Fixes: https://github.com/swaywm/sway/issues/7573 Regressed by: https://github.com/swaywm/sway/pull/7552
* render: Clear using wlr_output dimensionsLibravatar Kenny Levinsen2023-05-09
| | | | | | | | | | Clear was done using sway_output's logical dimensions, instead of the wlr_output physical dimensions. This meant that when output scaling was applied, only a part of the screen would be cleared. Use the wlr_output dimensions instead. Regressed by: https://github.com/swaywm/sway/pull/7552
* render: Apply clip to rendered texture correctlyLibravatar Kenny Levinsen2023-05-09
| | | | | | | | | | The new wlr_render_pass API provides src_box, dst_box and clip parameters for texture rendition. Rather than clipping the dst_box, which control the projection matrix and leads to compression, intersect the damage and clip box and pass these as a clip parameter. Fixes: https://github.com/swaywm/sway/issues/7579 Regressed by: https://github.com/swaywm/sway/pull/7552
* Don't crash if there is no damage during renderLibravatar Alexander Orzechowski2023-05-02
|
* render: Use wlr_render_passLibravatar Alexander Orzechowski2023-05-02
|
* render: Don't pass matrix into render_textureLibravatar Alexander Orzechowski2023-05-02
|
* render: pass rendering state together in a structLibravatar Alexander Orzechowski2023-05-02
| | | | This lets us easily add rendering state that we need in the future
* Move output commit out of output_render()Libravatar Simon Ser2023-02-22
| | | | That way output_render() only does what it says on the tin.
* Constify pixman_region32_t for rendering functionsLibravatar Simon Ser2023-02-22
|
* Check return value of wlr_renderer_begin()Libravatar Simon Ser2023-01-21
| | | | | | | | | | Since [1], wlr_renderer_begin() can fail. Check its return value and bail. This fixes an assertion error (when begin() fails and then we try to render something) after a GPU reset. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/a541c9510a4cf544313bc9b0503d75820b42444e
* Replace math functions that promote float to doubleLibravatar Carl Smedstad2023-01-03
|
* Make GLES2 optionalLibravatar Simon Ser2022-11-28
|
* Use wlr_damage_ringLibravatar Kirill Primak2022-11-11
| | | wlr_output_damage is to be replaced with wlr_damage_ring, so use that.
* Implement ext-session-lock-v1Libravatar Daniel De Graaf2022-04-29
|
* Upgrade for wlroots surface refactoringLibravatar Simon Ser2022-01-13
| | | | | | See [1] for details. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3412
* Add focused_tab_titleLibravatar Vsevolod2021-12-10
|
* sway: create wlr_renderer and wlr_allocatorLibravatar Simon Zeni2021-11-18
| | | | | wlroots now required the compositor to create its own wlr_renderer and wlr_allocator to initialize the wlr_output
* render: fix -Ddamage=rerenderLibravatar Kirill Primak2021-09-07
|
* Use fixed titlebar heightsLibravatar Hugo Osvaldo Barrera2021-08-26
| | | | | | | | | | | | | | | Use fixed titlebar heights. The default height is calculated based on font metrics for the configured font and current locale. Some testing with titles with emoji and CJK characters (which are substantially higher in my setup) shows that the titlebars retain their initial value, text does shift up or down, and all titlebars always remain aligned. Also drop some also now-unecessary title_height calculations. Makes also needed to be updated, since they should be positioned with the same rules.
* Update wlr_box includesLibravatar Simon Ser2021-07-07
| | | | | | Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3011
* remove usage of `wlr_texture_get_size`Libravatar Tobias Langendorf2021-05-17
| | | | update for wlroots 6369f7093178f0d66414eb67c312a403bfbb84a4
* Remove support for arbitrary rotationsLibravatar Simon Ser2021-04-26
| | | | | | | There was some unused code-paths for rendering surfaces with an arbitrary rotation applied. This was imported from rootston. Since we don't have plans to make use of this, remove it.
* desktop/render: Pass explicit clip box to renderLibravatar Kenny Levinsen2021-04-26
| | | | | | | | | | | | | render_surface_iterator previously deduced the clip box from an optional container passed with render data. This causes problems when offsets in view geometry need to be compensated for in the clip dimensions. Instead, prepare the clip box in render_view_toplevels where the offsets are being applied, and compensate for them immediately. A similar compensation is applied to render_saved_view. Closes: https://github.com/swaywm/sway/issues/6223
* Remove usage of surface->sx|syLibravatar Kenny Levinsen2021-04-26
| | | | | | | | | | | | | | | These coordinates contain the all-time accumulated buffer attach point, which is a way to perform incremental client-side initiated movement of windows, intended as a way to maintain logical window positioning while compensating for layout changes such as folding in a left side panel. This value is not useful for implementing this feature, and break things if they ever become non-zero. Their inclusion in calculations also tend to cause confusion. Remove usage of these coordinates, removing the ability for clients to move themselves. This may again be supported if a better API is made available from wlroots.
* desktop/render: remove unused wlr_gles2_texture_attribsLibravatar Simon Ser2021-04-11
| | | | | We were calling wlr_gles2_texture_get_attribs, but we were never using the result.
* render: Clip surfaces to container boundsLibravatar Kenny Levinsen2021-03-01
| | | | | | | If a surface is associated with a sway container, we limit the destination box to the container dimensions. Floating views and popups are exempt from this clipping.
* render: handle containers without output when rendering titlesLibravatar Quantum2021-02-25
| | | | | | | | | | | In e0a94bee8da3271f942c0881ee18a7e2d4138063, it was believed that if the container is being rendered, it must have an output. This turned out not to be the case. When rendering a container, all its children are rendered, even if the children is positioned off screen and thus not having any output. This is the cause of the crash in #6061. This commit introduces a null-check, which fixes #6061.
* Fix #5643, #5064: rounding issues in floating-point -> integer conversionsLibravatar Dimitris Triantafyllidis2021-02-22
| | | | | | | | | | | | | Currently, various floating-point expressions involving the coordinates of borders, titlebars and content surfaces are directly assigned to integers, and so they are rounded towards zero. This results in off-by-one distances between these elements when the signs of their coordinates differ. Fixed by wrapping these expressions with a call to floor before the assignment.
* container: Add container_is_current_floatingLibravatar Kenny Levinsen2021-02-22
| | | | | Needed to check if containers are currently floating from render code, as container_is_floating checks pending state.
* render: scale titlebars correctly when straddling outputsLibravatar Quantum2021-02-22
| | | | | | | | | | | | When a container straddles multiple outputs, the title bar is only rendered at the scale of the "effective" output. If the title bar straddles onto another output with a different scale factor, it was drawn at the wrong size. In this commit, we take into consideration the scale the title was rendered at and scale it accordingly so that it appears at the right size on the other outputs. This fixes #6054.
* render: Use current instead of pending fullscreenLibravatar Kenny Levinsen2021-02-16
|
* container: Move pending state to state structLibravatar Kenny Levinsen2021-02-16
| | | | | | | | | Pending state is currently inlined directly in the container struct, while the current state is in a state struct. A side-effect of this is that it is not immediately obvious that pending double-buffered state is accessed, nor is it obvious what state is double-buffered. Instead, use the state struct for both current and pending.
* view: Save surface x and y on saved buffersLibravatar Kenny Levinsen2021-02-09
| | | | | | | | | We need to use surface_x and surface_y when rendering and damaging saved buffers as these compensate for views that have been centered due to being smaller than their container. Add them to the surface positions on the saved buffer so we have the values from the time the buffer was saved.
* Rename output_layer_for_each_surface_{toplevel,popup}Libravatar Simon Ser2021-01-12
| | | | Swap the "surface" part for consistency with wlroots' naming.
* Switch to wlr_xdg_surface_for_each_popup_surfaceLibravatar Simon Ser2021-01-12
| | | | | | | | Instead of calling wlr_xdg_surface_for_each_popup and then wlr_surface_for_each_surface, use the new for_each_popup_surface helper introduced in [1] that does it in one go. [1]: https://github.com/swaywm/wlroots/pull/2609
* desktop/render: show indicators for top-level splitLibravatar Tudor Brindus2020-10-04
| | | | | | | | | i3 shows indicators for the workspace-level pseudo-split, but Sway does not, as of b977c02. This commit replaces the floating container check with a call to `container_is_floating`, which has some more robust checks in place. Fixes #5699.
* Add support for viewporterLibravatar Simon Ser2020-06-17
| | | | | | Depends on [1]. [1]: https://github.com/swaywm/wlroots/pull/2092
* Save transform during transactionLibravatar Kalyan Sriram2020-06-05
| | | Closes: https://github.com/swaywm/sway/issues/5412
* view: Save all buffers associated with viewLibravatar Kenny Levinsen2020-06-03
| | | | | | | | | | | | During the execution of a resize transaction, the buffer associated with a view's surface is saved and reused until the client acknowledges the resulting configure event. However, only one the main buffer of the main surface was stored and rendered, meaning that subsurfaces disappear during resize. Iterate over all, store and render buffers from all surfaces in the view to ensure that correct rendering is preserved.
* Render layer shell popups over the top layerLibravatar David962020-04-10
|