When building without GL renderer the compiler prints the following
warning:
../clients/subsurfaces.c: In function ‘egl_state_create’:
../clients/subsurfaces.c:225:35: warning: passing argument 1 of
‘weston_platform_get_egl_display’ makes pointer from integer without a
cast [-Wint-conversion]
225 | weston_platform_get_egl_display(EGL_PLATFORM_WAYLAND_KHR,
| ^~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
...
Define the fallback implementation of weston_platform_get_egl_display
to take an integer which is the underlaying datatype of EGLenum.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Introduce the weston_platform_destroy_egl_surface() wrapper to
complement the weston_platform_create_egl_surface() one.
We'll use the former with the next patches trhoughout weston to
consistently destroy the surface as needed.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Including `weston-egl-ext.h` causes compilation failure for configurations
with EGL disabled.
Verified with `--disable-egl`, `--disable-x11-compositor`
and `--disable-drm-compositor`.
Signed-off-by: Krzysztof Konopko <kris@youview.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
... prefixing it with a "weston_". This way we can reuse it across the
board, instead of the current strstr. The latter of which can give us
false positives, thus it will be resolved with next commit(s).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Required by the bool type, used through the header.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This allows the header to be consumed by C++ compilers, because C++ does
away with C's implicit cast from (void*).
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
When no X11 headers are present eglplatform.h will break unless
certain defines are set prior to its inclusion.
including wayland-egl.h defines WL_EGL_PLATFORM which will stop
the attempted inclusion of the X11 headers.
Maybe this isn't the best solution to the problem, but it's harmless
and gets the job done.
Closes bug: https://bugs.freedesktop.org/show_bug.cgi?id=92104
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
(patch by Ahmet Acar, commit log by Derek Foreman)
Some DRI drivers, including VMware vmwgfx, do not support
calling eglQueryString() with a EGL_NO_DISPLAY parameter.
Allow toytoolkit to create EGL surfaces with them, by
falling back to the old creation method.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
The dummy typedefs for "get_platform_display()" and
"create_platform_window()" were badly defined, which
prevented building Weston on older systems.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>