zccrs
3c03639cd5
render: add get native paint target of renderer
...
Add wlr_pixman_buffer_get_current_image for wlr_pixman_renderer.
Add wlr_gles2_buffer_get_current_fbo for wlr_gles2_renderer.
Allow get the FBO/pixman_image_t, the compositor can be add some
action for FBO(for eg, attach a depth buffer), or without pixman
render to pixman_image_t(for eg, use QPainter of Qt instead of pixman).
4 years ago
zccrs
dc17ecd236
render/pixman: add wlr_*_is_pixman and wlr_pixman_texture_get_image
...
Add the following functions:
- wlr_renderer_is_pixman
- wlr_texture_is_pixman
- wlr_pixman_texture_get_image
4 years ago
zccrs
fdc40e071e
render/gles2: add wlr_renderer_is_gles2
...
Export the interface used to determine whether the wlr_renderer object
is gles2.
4 years ago
Simon Ser
2806154900
render: add missing arg to wlr_renderer_impl.get_buffer_caps
...
The types of buffers supported by the renderer might depend on the
renderer's instance. For instance, a renderer might only support
DMA-BUFs if the necessary EGL extensions are available.
Pass the wlr_renderer to get_buffer_caps so that the renderer can
perform such checks.
Fixes: 982498fab3
("render: introduce renderer_get_render_buffer_caps")
4 years ago
Simon Ser
6430230d1f
render: add wlr_renderer_begin_with_buffer
...
This allows compositors to choose a wlr_buffer to render to. This
is a less awkward interface than having to call bind_buffer() before
and after begin() and end().
Closes: https://github.com/swaywm/wlroots/issues/2618
4 years ago
Simon Ser
9d55f712e3
render: introduce wlr_texture_from_buffer
...
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.
4 years ago
Simon Ser
6369f70931
render: remove wlr_texture_get_size
...
Users can just access the width/height fields directly.
4 years ago
Simon Zeni
982498fab3
render: introduce renderer_get_render_buffer_caps
4 years ago
Simon Zeni
10c5199d85
render/gles2: introduce wlr_gles2_renderer_create_with_drm_fd
4 years ago
Simon Zeni
0d90dddfab
render: introduce pixman renderer
4 years ago
Simon Zeni
84dea55b20
render: rename get_dmabuf_render_formats into get_render_formats
4 years ago
Simon Ser
a109a80dca
render: drop support for ellipses
...
For anything more complicated than quads, compositors can easily
ship their own shaders.
Closes: https://github.com/swaywm/wlroots/issues/2759
4 years ago
Simon Ser
9ecfa4343a
render: remove wlr_texture_to_dmabuf
...
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.
4 years ago
Simon Ser
1cdef8da57
render: drop wlr_renderer_blit_dmabuf
...
It can be replaced with wlr_renderer_bind_buffer. blit_dmabuf is
broken as-is (dies on an assertion).
4 years ago
Simon Ser
cf5b09ede2
Remove unnecessary wayland-server-protocol.h includes
4 years ago
Simon Ser
27fba3df43
render: use DRM formats in wlr_texture_from_pixels
4 years ago
Simon Ser
b54ef3372d
render: use DRM formats in wlr_renderer_read_pixels
4 years ago
Simon Ser
00bf6674b3
output: use DRM format in wlr_output_preferred_read_format
4 years ago
Simon Ser
ddfee63055
render: use DRM formats in wlr_renderer_get_shm_texture_formats
4 years ago
Simon Ser
3d7aa73867
render/dmabuf: make src arg const in wlr_dmabuf_attributes_copy
4 years ago
Brandon Dowdy
8aa38fe73e
render/egl: remove *config_attribs and wlr_egl->config
...
Breaking changes:
Both "EGLint *config_attribs" and "wlr_egl->config" no longer exist.
4 years ago
Brandon Dowdy
705b3da7cb
render/egl: remove wlr_egl_{create,destroy}_surface
...
Breaking changes:
wlr_egl_create_surface and wlr_egl_destroy_surface have been
removed and no longer exist.
4 years ago
Simon Ser
7c995b78b2
Revert "render: add wlr_egl_create_from_drm_fd function"
...
This reverts commit ee31be167b
.
4 years ago
Simon Ser
54e5ef39c0
Revert "render/egl: remove unused gbm_device member"
...
This reverts commit 306cf11d87
.
4 years ago
Simon Zeni
306cf11d87
render/egl: remove unused gbm_device member
4 years ago
Simon Zeni
ee31be167b
render: add wlr_egl_create_from_drm_fd function
4 years ago
Simon Zeni
08a4c62aac
render: remove egl include from wlr_renderer
4 years ago
Simon Zeni
e128e6c08d
render: drop egl parameters from wlr_renderer_autocreate
4 years ago
Simon Ser
3f7e0cf5f0
render/egl: remove surface and buffer age args from make_current
...
These aren't used anymore.
4 years ago
Simon Ser
1d461687d2
render/egl: replace init/finish with create/destroy
...
This ensures wlr_gles2_renderer can properly take ownership of the
wlr_egl.
Closes: https://github.com/swaywm/wlroots/issues/2612
4 years ago
Simon Ser
50b120927d
render/egl: remove wlr_egl_swap_buffers
4 years ago
Simon Ser
76ed2255ef
render/egl: remove support for EGL_NATIVE_VISUAL_ID
...
Nobody uses it anymore.
4 years ago
Simon Ser
64da8f0c8d
render/egl: document NULL config_attribs passed to wlr_egl_init
4 years ago
Simon Ser
41aa80d4a1
render/egl: use KHR function pointer type
...
KHR is more "core" than EXT.
4 years ago
Simon Ser
34b14d2fee
render/egl: document that config may be zero
4 years ago
Simon Zeni
9192c0480a
remove unnecessary egl includes
4 years ago
Simon Zeni
b899a412e3
backend: remove wlr_egl from all backends
4 years ago
Simon Ser
07d75c99db
render: remove EGL config and visual from wlr_renderer_autocreate
...
This isn't used anymore by any backend.
Some examples still provide an EGL config to wlr_egl_init, so we can't
drop it yet there.
4 years ago
Simon Ser
83a5d03bf3
render/egl: remove wlr_egl.external_only_dmabuf_formats
...
Replace it with wlr_egl.dmabuf_render_formats.
4 years ago
Simon Ser
c94ab99ae2
render: rename wlr_renderer_get_formats
...
Rename wlr_renderer_get_formats to wlr_renderer_get_shm_texture_formats.
This makes it clear those formats are only suitable for shm import.
4 years ago
Simon Ser
49115e9d5d
render: rename wlr_renderer_get_dmabuf_formats
...
Rename wlr_renderer_get_dmabuf_formats to
wlr_renderer_get_dmabuf_texture_formats. This makes it clear the formats
are only suitable for creating wlr_textures.
4 years ago
Simon Ser
5d008d9030
render: introduce wlr_renderer_get_dmabuf_render_formats
...
It describes which DMA-BUF formats can be used to render.
4 years ago
Simon Ser
61612ecb36
render: remove wlr_renderer_format_supported
...
Instead, callers can just use wlr_renderer_get_formats and iterate over
the list.
This function was unused in wlroots.
4 years ago
Simon Ser
c15ca3793e
render: expand wlr_renderer_get{,_dmabuf}_formats docs
...
Make it clear formats returned are only suitable for import/sampling.
These formats can't be used to be rendered to.
4 years ago
Ilia Bozhinov
6284af121f
texture: document that functions should not be called while rendering
4 years ago
Simon Ser
e18599b05e
render/egl: stop including eglmesaext.h
...
This is a Mesa-specific header that was needed because some Wayland EGL
extensions were missing from the Khronos registry. Now that this has
been fixed [1] and Mesa [2] & glvnd [3] have sync'ed their headers, we
can drop this workaround.
[1]: https://github.com/KhronosGroup/EGL-Registry/pull/95
[2]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4953
[3]: https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/225
4 years ago
Simon Ser
eb8360bda3
render: introduce wlr_renderer_get_drm_fd
4 years ago
Simon Ser
c8d95acc37
render/egl: introduce wlr_egl_dup_drm_fd
4 years ago
Simon Ser
c88c54fb38
render: introduce wlr_renderer_bind_buffer
4 years ago
Isaac Freund
0724b3c453
Use uint32_t in wlr_renderer_begin signature
...
This matches the signature of wlr_renderer_impl.begin
4 years ago