aboutsummaryrefslogtreecommitdiff
path: root/render/wlr_texture.c
AgeCommit message (Collapse)Author
2023-11-30wlr_texture: Introduce wlr_texture_preferred_read_formatAlexander Orzechowski
2023-11-30wlr_texture: Introduce wlr_texture_read_pixels_options helpersAlexander Orzechowski
2023-11-30wlr_texture: Introduce wlr_texture_read_pixelsAlexander Orzechowski
2023-07-07Use struct initializers instead of memset()Simon Ser
This is a bit more type-safe.
2022-12-01wlr_texture: Expose owning rendererAlexander Orzechowski
2022-11-11render/texture: constify wlr_texture_update_from_buffer()Simon Ser
2022-08-12render: replace wlr_texture_write_pixels with update_from_bufferSimon Ser
This lets the renderer handle the wlr_buffer directly, just like it does in texture_from_buffer. This also allows the renderer to batch the rectangle updates, and update more than the damage region if desirable (e.g. too many rects), so can be more efficient.
2022-06-16render/texture: drop wlr_texture_is_opaqueSimon Ser
Whether a texture is opaque or not doesn't depend on the renderer at all, it just depends on the source buffer. Instead of forcing all renderers to implement wlr_texture_impl.is_opaque, let's move this in common code and use the wlr_buffer format to know whether a texture will be opaque.
2022-04-28Zero-initialize structs in init functionsSimon Ser
Ensures there is no field left to its previous undefined value after calling an init function.
2022-02-28render: allow texture creation while renderingRoman Gilg
This removes an artificial limitation in form of an assert that disallowed the creation of textures while the renderer is rendering. A consumer might run its own rendering pipeline and after start of the renderer still want to create textures for internal usage.
2021-07-22render/wlr_texture: put wlr_texture_from_buffer into the public APISimon Zeni
2021-07-05render: remove wl_drm support from wlr_rendererSimon Ser
Everything needs to go through the unified wlr_buffer interface now. If necessary, there are two ways support for EGL_WL_bind_wayland_display could be restored by compositors: - Either by using GBM to convert back EGL Wayland buffers to DMA-BUFs, then wrap the DMA-BUF into a wlr_buffer. - Or by wrapping the EGL Wayland buffer into a special wlr_buffer that doesn't implement any wlr_buffer_impl hook, and special-case that buffer type in the renderer.
2021-07-01render: use wlr_dmabuf_buffer in wlr_texture_from_dmabufSimon Ser
2021-07-01render: use wlr_readonly_data_buffer in wlr_texture_from_pixelsSimon Ser
2021-05-19render: relax stride check in wlr_texture_from_pixelsSimon Ser
Some formats have a byte-per-pixel lower than 1. Let's not encode an arbitrary limitation into the wlr_renderer API.
2021-05-17render: introduce wlr_texture_from_bufferSimon Ser
This adds a a function to create a wlr_texture from a wlr_buffer. The main motivation for this is to allow the renderer to create a single wlr_texture per wlr_buffer. This can avoid needless imports by re-using existing textures.
2021-05-17render: remove wlr_texture_get_sizeSimon Ser
Users can just access the width/height fields directly.
2021-04-20render: Assert that texture dimensions are > 0nyorain
2021-04-08render: remove wlr_texture_to_dmabufSimon Ser
This is unused in wlroots, and the use-cases for compositors are pretty niche since they can access the original DMA-BUF via the wlr_buffer.
2021-02-23render: use DRM formats in wlr_texture_from_pixelsSimon Ser
2020-04-28render/texture: make write_pixels optionalSimon Ser
2020-04-28render/texture: add width and height fieldsSimon Ser
Instead of requiring compositors to call wlr_texture_get_size each time they want to access the texture's size, expose this information as wlr_texture fields.
2019-11-25render: remove return in wlr_texture_get_sizeSimon Ser
Otherwise this error happens: ../subprojects/wlroots/render/wlr_texture.c: In function ‘wlr_texture_get_size’: ../subprojects/wlroots/render/wlr_texture.c:47:9: error: ISO C forbids ‘return’ with expression, in function returning void [-Werror=pedantic] 47 | return texture->impl->get_size(texture, width, height); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../subprojects/wlroots/render/wlr_texture.c:45:6: note: declared here 45 | void wlr_texture_get_size(struct wlr_texture *texture, int *width, | ^~~~~~~~~~~~~~~~~~~~
2018-10-15Remove fmt parameter from wlr_texture_write_pixelsnyorain
It's not allowed to change the format of a texture so remove the confusing parameter.
2018-07-12render: add wlr_texture_is_opaqueemersion
2018-05-31Merge branch 'master' into screencontentemersion
2018-05-30Only allow one modifier per DMA-BUF, split attributes struct in render/emersion
2018-05-29render: add wlr_texture_to_dmabufemersion
2018-03-24Redesign wlr_textureemersion
- Textures are now immutable (apart from those created from raw pixels), no more invalid textures - Move all wl_drm stuff in wlr_renderer - Most of wlr_texture fields are now private - Remove some duplicated DMA-BUF code in the DRM backend - Add more assertions - Stride is now always given as bytes rather than pixels - Drop wl_shm functions Fun fact: this patch has been written 10,000 meters up in the air.
2018-03-20render/gles2: remove global state, use OpenGL debug extensionemersion
2018-03-19render: split render.h into wlr_renderer.h and wlr_texture.hemersion
2018-03-15renderer: replace wlr_texture_get_matrix by wlr_render_textureemersion
2018-03-15Merge branch 'master' into matrix-redesignemersion
2018-03-15matrix: use 2D matricesemersion
2018-03-15Add initial linux_dmabuf protocol supportGuido Günther
Tested with ./weston-simple-dmabuf-drm ./weston-simple-dmabuf-drm --import-immediate=1 ./weston-simple-dmabuf-drm --y-inverted=1 (and combinations) Supports only single plane XRGB dmabufs for now.
2018-03-15matrix: unify API, don't use array pointersemersion
2018-02-19Revert "ELF Visibility"Drew DeVault
2018-02-19Explicitly export EFL symbolsScott Anderson
2018-02-12Reformat all #include directivesemersion
2017-10-01Multi-GPU DRMScott Anderson
2017-08-15implement texture get buffer sizeTony Crisci
2017-08-14impl->destroy cleanup:Dominique Martinet
- remove trivial destroy() function - make sure we check impl and impl->destroy before calling - always call free if not implemented
2017-08-14Fix software cursorsDrew DeVault
2017-08-14Refactor out wlr_texture_stateDrew DeVault
2017-08-10Implement drm (egl) buffer attachingnyorain
2017-08-09Implement partial texture uploadsDrew DeVault
2017-08-08Rename wlr_surface -> wlr_texture; attach -> uploadnyorain