Simon Zeni
cdacf4f632
render: introduce WLR_RENDERER in wlr_renderer_autocreate_with_drm_fd
...
This env var forces the creation of a specific renderer. If no renderer
is specified, the function will try to create all of the renderers one
by one until one is created successfuly.
4 years ago
ayaka
ed1924800d
render: make GLES2 renderer optional
...
Allow selecting whether the GLES2 renderer gets enabled.
Co-authored-by: Simon Ser <contact@emersion.fr>
4 years ago
Simon Zeni
122d6c6988
renderer: create pixman renderer if getting drm fd failed
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
Roman Gilg
b36af22c94
backend: move get_drm_fd to public interface
...
The get_drm_fd was made available in an internal header with a53ab146f
. Move it
now to the public header so consumers opting in to the unstable interfaces can
make use of it.
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
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 Zeni
50d2985607
Move render/shm_format functions to render/pixel_format
4 years ago
Simon Ser
b54ef3372d
render: use DRM formats in wlr_renderer_read_pixels
4 years ago
Simon Ser
ddfee63055
render: use DRM formats in wlr_renderer_get_shm_texture_formats
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
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 Ser
2f11914613
render: introduce private wlr_renderer_autocreate_with_drm_fd
4 years ago
Simon Zeni
e128e6c08d
render: drop egl parameters from wlr_renderer_autocreate
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
76ed2255ef
render/egl: remove support for EGL_NATIVE_VISUAL_ID
...
Nobody uses it anymore.
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
b9460ab724
Stop using wlr_texture_get_size
...
Just use wlr_texture.{width,height} directly.
4 years ago
Simon Ser
037710b1d4
render/egl: support config-less wlr_egl
...
When using wlr_swapchain, there's no need to select an EGLConfig. Add
support for creating config-less EGL contexts.
4 years ago
Simon Ser
1f15dd093d
render: assert {X,A}RGB8888 are supported
...
The Wayland protocol requires those to be supported.
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
eb8360bda3
render: introduce wlr_renderer_get_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
Guido Cella
6949d0fd38
render: Don't crash on 0 dimensions
...
Don't force compositors to check when an empty shape is being renderered.
References #2282 . This was motivated by dwl crashing when setting window
borders to 0 (djpohly/dwl#51 ).
4 years ago
Simon Ser
315bf08733
render: add wlr_render_subtexture_with_matrix
...
This renders only a subset of the texture, instead of the full texture.
5 years ago
Rouven Czerwinski
d3d1bac1c2
render: assert sane values for box functions
...
Width and height should always be > 0 for render functions which take a
wlr_box.
References https://github.com/swaywm/wlroots/issues/2281
5 years ago
Andri Yngvason
b64a8a7f98
render: Add wlr_renderer_blit_dmabuf()
5 years ago
Simon Ser
d10f8a98ec
render: only expose linux-dmabuf if EGL extension is supported
...
Only expose linux-dmabuf extension if EGL_EXT_image_dmabuf_import_ext is
supported.
Closes: https://github.com/swaywm/wlroots/issues/2076
5 years ago
Isaac Freund
c682d97841
Return failure of wlr_renderer_init_wl_display()
...
This makes it easier for the user of this library to properly handle
failure of this function.
The signature of wlr_renderer_impl.init_wl_display was also modified to
allow for proper error propagation.
5 years ago
Simon Ser
346b43e937
render: guard rendering operations between begin() and end()
...
Add a wlr_renderer.rendering bool, set it to true between
wlr_renderer_begin() and wlr_renderer_end(). Assert we're rendering when
calling functions that render.
5 years ago
emersion
e42178d03f
render: switch wlr_renderer to wlr_drm_format_set
6 years ago
Ilia Bozhinov
fb5691b6cc
output: add wlr_output_preferred_read_format()
...
The read format is dependent on the output, so we first need to make it
current. This fixes a race condition in wlr-screencopy-v1 where a dmabuf
client would cause EGL_NO_SURFACE to be bound at the time when
screencopy needs to query for the preferred format, causing GL errors.
6 years ago
emersion
09550032b7
render: correctly set EGL_RENDERABLE_TYPE
...
This should be set to EGL_OPENGL_ES2_BIT.
Also fixes EGL config attributes in the headless and X11 backends.
6 years ago
emersion
62d646f2b8
render/gles2: remove assumptions about supported formats
...
We were assuming GL_BGRA_EXT was always supported.
We now check that it's supported for rendering. We fail if it isn't because
this format is specified as "always supported" by the Wayland protocol.
We also check if it's supported for reading pixels. A new preferred_read_format
function returns the preferred format that can be used to read pixels. This is
used by the screencopy protocol.
6 years ago
emersion
2f0815838d
Init dmabuf global in renderer
6 years ago
emersion
7cbef15206
util: add wlr_ prefix to log symbols
7 years ago
emersion
2b9cbaddf3
screencopy: add support for frame flags
7 years ago
Dominique Martinet
4cc4412481
wlr_renderer_destroy: fix renderer NULL check
...
renderer is checked for NULL, but was dereferenced before that.
Found through static analysis
7 years ago
emersion
135721118a
render: remove wlr_renderer_check_import_dmabuf
...
It's possible to implement it outside the renderer, by creating a
texture and destroying it right away. This reduces the API surface
of the renderer.
7 years ago
emersion
28020ff577
Only allow one modifier per DMA-BUF, split attributes struct in render/
7 years ago
emersion
6eb4b5b54d
Merge pull request #993 from emersion/bind-wl-drm-in-renderer
...
render: bind wl_drm in renderer
7 years ago