2011-07-02 17:57:30 +09:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
s/Tungsten Graphics/VMware/
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the
old copyright name is creating unnecessary confusion, hence this change.
This was the sed script I used:
$ cat tg2vmw.sed
# Run as:
#
# git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
#
# Rename copyrights
s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
/Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
s/TUNGSTEN GRAPHICS/VMWARE/g
# Rename emails
s/alanh@tungstengraphics.com/alanh@vmware.com/
s/jens@tungstengraphics.com/jowen@vmware.com/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
s/michel@tungstengraphics.com/daenzer@vmware.com/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/zack@tungstengraphics.com/zackr@vmware.com/
# Remove dead links
s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g
# C string src/gallium/state_trackers/vega/api_misc.c
s/"Tungsten Graphics, Inc"/"VMware, Inc"/
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-17 16:27:50 +00:00
|
|
|
* Copyright 2008 VMware, Inc.
|
2011-07-02 17:57:30 +09:00
|
|
|
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
|
|
|
* Copyright 2010-2011 LunarG, Inc.
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
* distribute, sub license, and/or sell copies of the Software, and to
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
* the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice (including the
|
|
|
|
* next paragraph) shall be included in all copies or substantial portions
|
|
|
|
* of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
* DEALINGS IN THE SOFTWARE.
|
|
|
|
*
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
2005-04-22 21:09:39 +00:00
|
|
|
#ifndef EGLDISPLAY_INCLUDED
|
|
|
|
#define EGLDISPLAY_INCLUDED
|
|
|
|
|
2015-03-06 16:54:55 +00:00
|
|
|
#include "c11/threads.h"
|
2010-01-29 09:00:30 +08:00
|
|
|
|
2005-04-22 21:09:39 +00:00
|
|
|
#include "egltypedefs.h"
|
2009-08-13 13:38:24 +08:00
|
|
|
#include "egldefines.h"
|
2010-06-30 17:10:10 +08:00
|
|
|
#include "eglarray.h"
|
2009-08-13 13:38:24 +08:00
|
|
|
|
|
|
|
|
2015-05-13 17:13:37 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2010-06-17 17:14:03 +08:00
|
|
|
enum _egl_platform_type {
|
|
|
|
_EGL_PLATFORM_X11,
|
2020-08-26 19:01:53 +01:00
|
|
|
_EGL_PLATFORM_XCB,
|
2011-02-04 12:22:58 +01:00
|
|
|
_EGL_PLATFORM_WAYLAND,
|
2010-06-17 17:14:03 +08:00
|
|
|
_EGL_PLATFORM_DRM,
|
2010-10-11 16:09:52 +08:00
|
|
|
_EGL_PLATFORM_ANDROID,
|
2014-12-22 10:10:13 -05:00
|
|
|
_EGL_PLATFORM_HAIKU,
|
2015-06-12 10:10:58 -07:00
|
|
|
_EGL_PLATFORM_SURFACELESS,
|
2019-05-16 18:01:40 +01:00
|
|
|
_EGL_PLATFORM_DEVICE,
|
2021-09-01 08:54:13 -07:00
|
|
|
_EGL_PLATFORM_WINDOWS,
|
2025-04-06 01:33:19 +08:00
|
|
|
_EGL_PLATFORM_OHOS,
|
2010-06-17 17:14:03 +08:00
|
|
|
|
|
|
|
_EGL_NUM_PLATFORMS,
|
|
|
|
_EGL_INVALID_PLATFORM = -1
|
|
|
|
};
|
|
|
|
typedef enum _egl_platform_type _EGLPlatformType;
|
|
|
|
|
|
|
|
|
2010-01-24 20:30:04 +08:00
|
|
|
enum _egl_resource_type {
|
|
|
|
_EGL_RESOURCE_CONTEXT,
|
|
|
|
_EGL_RESOURCE_SURFACE,
|
2009-08-15 22:58:13 +08:00
|
|
|
_EGL_RESOURCE_IMAGE,
|
2010-08-14 23:09:12 +08:00
|
|
|
_EGL_RESOURCE_SYNC,
|
2010-01-24 20:30:04 +08:00
|
|
|
|
|
|
|
_EGL_NUM_RESOURCES
|
|
|
|
};
|
2010-02-19 11:47:54 +08:00
|
|
|
/* this cannot and need not go into egltypedefs.h */
|
|
|
|
typedef enum _egl_resource_type _EGLResourceType;
|
2010-01-24 20:30:04 +08:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A resource of a display.
|
|
|
|
*/
|
|
|
|
struct _egl_resource
|
|
|
|
{
|
2010-01-26 15:16:49 +08:00
|
|
|
/* which display the resource belongs to */
|
2010-01-24 20:30:04 +08:00
|
|
|
_EGLDisplay *Display;
|
2010-01-26 15:16:49 +08:00
|
|
|
EGLBoolean IsLinked;
|
2010-10-23 11:59:03 +08:00
|
|
|
EGLint RefCount;
|
2010-01-26 15:16:49 +08:00
|
|
|
|
2016-09-12 16:15:10 -04:00
|
|
|
EGLLabelKHR Label;
|
|
|
|
|
2010-01-26 15:16:49 +08:00
|
|
|
/* used to link resources of the same type */
|
2010-01-24 20:30:04 +08:00
|
|
|
_EGLResource *Next;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-08-13 13:38:24 +08:00
|
|
|
/**
|
|
|
|
* Optional EGL extensions info.
|
|
|
|
*/
|
|
|
|
struct _egl_extensions
|
|
|
|
{
|
2015-06-09 23:08:57 +02:00
|
|
|
/* Please keep these sorted alphabetically. */
|
2017-12-28 10:51:11 +02:00
|
|
|
EGLBoolean ANDROID_blob_cache;
|
2016-02-02 14:23:07 -06:00
|
|
|
EGLBoolean ANDROID_framebuffer_target;
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean ANDROID_image_native_buffer;
|
2016-11-18 08:39:33 -05:00
|
|
|
EGLBoolean ANDROID_native_fence_sync;
|
2016-02-02 14:23:08 -06:00
|
|
|
EGLBoolean ANDROID_recordable;
|
2010-08-14 23:09:12 +08:00
|
|
|
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean CHROMIUM_sync_control;
|
2011-02-21 16:22:34 +01:00
|
|
|
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean EXT_buffer_age;
|
|
|
|
EGLBoolean EXT_create_context_robustness;
|
|
|
|
EGLBoolean EXT_image_dma_buf_import;
|
2017-05-30 17:23:35 +05:30
|
|
|
EGLBoolean EXT_image_dma_buf_import_modifiers;
|
2017-10-31 10:57:42 +02:00
|
|
|
EGLBoolean EXT_pixel_format_float;
|
2020-12-15 19:19:22 +01:00
|
|
|
EGLBoolean EXT_protected_surface;
|
2021-08-02 21:16:34 +01:00
|
|
|
EGLBoolean EXT_present_opaque;
|
2018-04-05 13:02:36 +03:00
|
|
|
EGLBoolean EXT_surface_CTA861_3_metadata;
|
|
|
|
EGLBoolean EXT_surface_SMPTE2086_metadata;
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean EXT_swap_buffers_with_damage;
|
|
|
|
|
2016-10-27 19:34:46 +01:00
|
|
|
unsigned int IMG_context_priority;
|
|
|
|
#define __EGL_CONTEXT_PRIORITY_LOW_BIT 0
|
|
|
|
#define __EGL_CONTEXT_PRIORITY_MEDIUM_BIT 1
|
|
|
|
#define __EGL_CONTEXT_PRIORITY_HIGH_BIT 2
|
|
|
|
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean KHR_cl_event2;
|
2016-12-05 14:42:04 +00:00
|
|
|
EGLBoolean KHR_config_attribs;
|
2016-09-22 03:47:55 -04:00
|
|
|
EGLBoolean KHR_context_flush_control;
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean KHR_create_context;
|
2018-01-08 15:47:09 +00:00
|
|
|
EGLBoolean KHR_create_context_no_error;
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean KHR_fence_sync;
|
2014-11-20 10:26:38 -08:00
|
|
|
EGLBoolean KHR_get_all_proc_addresses;
|
2015-05-11 22:18:04 +02:00
|
|
|
EGLBoolean KHR_gl_colorspace;
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean KHR_gl_renderbuffer_image;
|
2010-01-31 17:34:02 +08:00
|
|
|
EGLBoolean KHR_gl_texture_2D_image;
|
|
|
|
EGLBoolean KHR_gl_texture_3D_image;
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean KHR_gl_texture_cubemap_image;
|
2017-12-08 21:29:39 +05:30
|
|
|
EGLBoolean KHR_image;
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean KHR_image_base;
|
|
|
|
EGLBoolean KHR_image_pixmap;
|
2018-04-30 22:32:25 -07:00
|
|
|
EGLBoolean KHR_mutable_render_buffer;
|
2016-09-09 12:25:34 -04:00
|
|
|
EGLBoolean KHR_no_config_context;
|
2017-06-09 20:13:34 +05:30
|
|
|
EGLBoolean KHR_partial_update;
|
2010-08-14 23:09:12 +08:00
|
|
|
EGLBoolean KHR_reusable_sync;
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean KHR_surfaceless_context;
|
2015-04-10 12:04:18 +02:00
|
|
|
EGLBoolean KHR_wait_sync;
|
2010-08-14 23:09:12 +08:00
|
|
|
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean MESA_drm_image;
|
|
|
|
EGLBoolean MESA_image_dma_buf_export;
|
2019-01-23 22:44:25 +05:30
|
|
|
EGLBoolean MESA_query_driver;
|
2010-08-14 23:09:12 +08:00
|
|
|
|
2010-05-06 22:01:35 -04:00
|
|
|
EGLBoolean NOK_swap_region;
|
2010-05-06 22:40:25 -04:00
|
|
|
EGLBoolean NOK_texture_from_pixmap;
|
2010-10-01 15:27:42 -04:00
|
|
|
|
2011-12-14 21:24:09 +01:00
|
|
|
EGLBoolean NV_post_sub_buffer;
|
2012-07-19 15:08:06 -07:00
|
|
|
|
2015-06-09 23:08:57 +02:00
|
|
|
EGLBoolean WL_bind_wayland_display;
|
|
|
|
EGLBoolean WL_create_wayland_buffer_from_image;
|
2009-08-13 13:38:24 +08:00
|
|
|
};
|
2005-04-22 21:09:39 +00:00
|
|
|
|
2010-06-17 17:14:03 +08:00
|
|
|
struct _egl_display
|
2005-04-22 21:09:39 +00:00
|
|
|
{
|
2009-08-14 17:47:00 +08:00
|
|
|
/* used to link displays */
|
|
|
|
_EGLDisplay *Next;
|
|
|
|
|
2015-03-06 16:54:55 +00:00
|
|
|
mtx_t Mutex;
|
2010-02-17 17:29:52 +08:00
|
|
|
|
2011-01-13 16:53:13 +08:00
|
|
|
_EGLPlatformType Platform; /**< The type of the platform display */
|
|
|
|
void *PlatformDisplay; /**< A pointer to the platform display */
|
2009-08-13 13:38:24 +08:00
|
|
|
|
2015-07-24 16:19:55 +02:00
|
|
|
_EGLDevice *Device; /**< Device backing the display */
|
2020-07-31 01:38:41 +02:00
|
|
|
const _EGLDriver *Driver; /**< Matched driver of the display */
|
2011-01-13 16:53:13 +08:00
|
|
|
EGLBoolean Initialized; /**< True if the display is initialized */
|
2009-08-13 13:38:24 +08:00
|
|
|
|
2011-01-13 00:27:45 +08:00
|
|
|
/* options that affect how the driver initializes the display */
|
|
|
|
struct {
|
2022-03-15 15:35:48 -04:00
|
|
|
EGLBoolean Zink; /**< Use kopper only */
|
2017-12-20 15:53:09 +00:00
|
|
|
EGLBoolean ForceSoftware; /**< Use software path only */
|
2019-05-16 18:01:34 +01:00
|
|
|
EGLAttrib *Attribs; /**< Platform-specific options */
|
2019-05-16 18:01:40 +01:00
|
|
|
int fd; /**< plaform device specific, local fd */
|
2011-01-13 00:27:45 +08:00
|
|
|
} Options;
|
|
|
|
|
2011-01-13 16:53:13 +08:00
|
|
|
/* these fields are set by the driver during init */
|
|
|
|
void *DriverData; /**< Driver private data */
|
2015-05-12 16:40:29 +02:00
|
|
|
EGLint Version; /**< EGL version major*10+minor */
|
2011-01-13 16:53:13 +08:00
|
|
|
EGLint ClientAPIs; /**< Bitmask of APIs supported (EGL_xxx_BIT) */
|
|
|
|
_EGLExtensions Extensions; /**< Extensions supported */
|
2009-08-13 13:38:24 +08:00
|
|
|
|
2011-01-13 16:53:13 +08:00
|
|
|
/* these fields are derived from above */
|
2015-03-19 01:36:08 +00:00
|
|
|
char VersionString[100]; /**< EGL_VERSION */
|
|
|
|
char ClientAPIsString[100]; /**< EGL_CLIENT_APIS */
|
2011-01-13 16:53:13 +08:00
|
|
|
char ExtensionsString[_EGL_MAX_EXTENSIONS_LEN]; /**< EGL_EXTENSIONS */
|
2009-08-13 13:38:24 +08:00
|
|
|
|
2010-06-30 17:10:10 +08:00
|
|
|
_EGLArray *Configs;
|
2008-05-27 16:48:23 -06:00
|
|
|
|
2010-01-24 20:32:34 +08:00
|
|
|
/* lists of resources */
|
2010-01-24 20:30:04 +08:00
|
|
|
_EGLResource *ResourceLists[_EGL_NUM_RESOURCES];
|
2016-09-12 16:15:10 -04:00
|
|
|
|
|
|
|
EGLLabelKHR Label;
|
2017-12-28 10:51:11 +02:00
|
|
|
|
|
|
|
EGLSetBlobFuncANDROID BlobCacheSet;
|
|
|
|
EGLGetBlobFuncANDROID BlobCacheGet;
|
2005-04-22 21:09:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-06-17 23:45:41 +08:00
|
|
|
extern _EGLPlatformType
|
egl/main: Stop using EGLNative types internally
Internally, much of the EGL code uses EGLNativeDisplayType,
EGLNativeWindowType, and EGLPixmapType. However, the EGLNative type
often does not match the variable's actual type.
The concept of EGLNative types are a bad match for Linux, as explained
below. And the EGL platform extensions don't use EGLNative types at all.
Those extensions attempt to solve cross-platform issues by moving the
EGL API away from the EGLNative types.
The core of the problem is that eglplatform.h can define each EGLNative
type once only, but Linux supports multiple EGL platforms.
To work around the problem, Mesa's eglplatform.h contains multiple
definitions of each EGLNative type, selected by feature macros. Mesa
expects EGL clients to set the feature macro approrpiately. But the
feature macros don't work when a single codebase must be built with
support for multiple EGL platforms, *such as Mesa itself*.
When building libEGL, autotools chooses the EGLNative typedefs based on
the first element of '--with-egl-platforms'. For example,
'--with-egl-platforms=x11,drm,wayland' defines the following:
typedef Display* EGLNativeDisplayType;
typedef Window EGLNativeWindowType;
typedef Pixmap EGLNativePixmapType;
Clearly, this doesn't work well for Wayland and GBM. Mesa works around
the problem by casting the EGLNative types to different things in
different files.
For sanity's sake, and to prepare for the EGL platform extensions, this
patch removes from egl/main and egl/dri2 all internal use of the
EGLNative types. It replaces them with 'void*' and checks each explicit
cast with a static assertion. Also, the patch touches egl_gallium the
minimal amount to keep it compatible with eglapi.h.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2014-01-07 14:54:51 -08:00
|
|
|
_eglGetNativePlatform(void *nativeDisplay);
|
2010-06-17 23:45:41 +08:00
|
|
|
|
|
|
|
|
2009-08-14 17:47:00 +08:00
|
|
|
extern void
|
|
|
|
_eglFiniDisplay(void);
|
|
|
|
|
|
|
|
|
2005-04-22 21:09:39 +00:00
|
|
|
extern _EGLDisplay *
|
2019-05-16 18:01:34 +01:00
|
|
|
_eglFindDisplay(_EGLPlatformType plat, void *plat_dpy, const EGLAttrib *attr);
|
2009-07-16 21:21:56 -07:00
|
|
|
|
|
|
|
|
2015-02-28 17:20:01 +00:00
|
|
|
extern void
|
2018-04-22 16:48:15 +02:00
|
|
|
_eglReleaseDisplayResources(_EGLDisplay *disp);
|
2009-07-16 21:21:57 -07:00
|
|
|
|
|
|
|
|
2015-02-28 17:20:01 +00:00
|
|
|
extern void
|
2009-07-17 11:48:27 -06:00
|
|
|
_eglCleanupDisplay(_EGLDisplay *disp);
|
|
|
|
|
|
|
|
|
2009-08-14 18:02:38 +08:00
|
|
|
extern EGLBoolean
|
|
|
|
_eglCheckDisplayHandle(EGLDisplay dpy);
|
|
|
|
|
|
|
|
|
2015-02-28 17:20:01 +00:00
|
|
|
extern EGLBoolean
|
2019-02-02 11:38:45 +00:00
|
|
|
_eglCheckResource(void *res, _EGLResourceType type, _EGLDisplay *disp);
|
2010-01-24 20:30:04 +08:00
|
|
|
|
|
|
|
|
2009-07-17 11:56:00 -06:00
|
|
|
/**
|
2009-08-14 18:05:19 +08:00
|
|
|
* Lookup a handle to find the linked display.
|
|
|
|
* Return NULL if the handle has no corresponding linked display.
|
|
|
|
*/
|
2015-02-28 16:35:22 +00:00
|
|
|
static inline _EGLDisplay *
|
2019-02-02 11:38:45 +00:00
|
|
|
_eglLookupDisplay(EGLDisplay dpy)
|
2009-08-14 18:05:19 +08:00
|
|
|
{
|
2019-02-02 11:38:45 +00:00
|
|
|
_EGLDisplay *disp = (_EGLDisplay *) dpy;
|
|
|
|
if (!_eglCheckDisplayHandle(dpy))
|
|
|
|
disp = NULL;
|
|
|
|
return disp;
|
2009-08-14 18:05:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the handle of a linked display, or EGL_NO_DISPLAY.
|
|
|
|
*/
|
2015-02-28 16:35:22 +00:00
|
|
|
static inline EGLDisplay
|
2019-02-02 11:38:45 +00:00
|
|
|
_eglGetDisplayHandle(_EGLDisplay *disp)
|
2009-08-14 18:05:19 +08:00
|
|
|
{
|
2019-02-02 11:38:45 +00:00
|
|
|
return (EGLDisplay) ((disp) ? disp : EGL_NO_DISPLAY);
|
2009-08-14 18:05:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-10-23 11:59:03 +08:00
|
|
|
extern void
|
2019-02-02 11:38:45 +00:00
|
|
|
_eglInitResource(_EGLResource *res, EGLint size, _EGLDisplay *disp);
|
2010-10-23 11:59:03 +08:00
|
|
|
|
|
|
|
|
2015-02-28 17:20:01 +00:00
|
|
|
extern void
|
2010-10-23 11:59:03 +08:00
|
|
|
_eglGetResource(_EGLResource *res);
|
|
|
|
|
|
|
|
|
2015-02-28 17:20:01 +00:00
|
|
|
extern EGLBoolean
|
2010-10-23 11:59:03 +08:00
|
|
|
_eglPutResource(_EGLResource *res);
|
|
|
|
|
|
|
|
|
2010-01-24 20:30:04 +08:00
|
|
|
extern void
|
2010-10-23 00:37:19 +08:00
|
|
|
_eglLinkResource(_EGLResource *res, _EGLResourceType type);
|
2010-01-24 20:30:04 +08:00
|
|
|
|
|
|
|
|
|
|
|
extern void
|
|
|
|
_eglUnlinkResource(_EGLResource *res, _EGLResourceType type);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return true if the resource is linked.
|
|
|
|
*/
|
2015-02-28 16:35:22 +00:00
|
|
|
static inline EGLBoolean
|
2010-01-24 20:30:04 +08:00
|
|
|
_eglIsResourceLinked(_EGLResource *res)
|
|
|
|
{
|
2010-01-26 15:16:49 +08:00
|
|
|
return res->IsLinked;
|
2010-01-24 20:30:04 +08:00
|
|
|
}
|
|
|
|
|
2019-05-16 18:01:33 +01:00
|
|
|
static inline size_t
|
|
|
|
_eglNumAttribs(const EGLAttrib *attribs)
|
|
|
|
{
|
|
|
|
size_t len = 0;
|
|
|
|
|
|
|
|
if (attribs) {
|
|
|
|
while (attribs[len] != EGL_NONE)
|
|
|
|
len += 2;
|
|
|
|
len++;
|
|
|
|
}
|
|
|
|
return len;
|
|
|
|
}
|
|
|
|
|
2014-01-23 07:26:10 -08:00
|
|
|
#ifdef HAVE_X11_PLATFORM
|
|
|
|
_EGLDisplay*
|
2017-11-16 13:27:27 -05:00
|
|
|
_eglGetX11Display(Display *native_display, const EGLAttrib *attrib_list);
|
2014-01-23 07:26:10 -08:00
|
|
|
#endif
|
|
|
|
|
2020-08-26 19:01:53 +01:00
|
|
|
#ifdef HAVE_XCB_PLATFORM
|
|
|
|
typedef struct xcb_connection_t xcb_connection_t;
|
|
|
|
_EGLDisplay*
|
|
|
|
_eglGetXcbDisplay(xcb_connection_t *native_display, const EGLAttrib *attrib_list);
|
|
|
|
#endif
|
|
|
|
|
2014-01-23 07:26:10 -08:00
|
|
|
#ifdef HAVE_DRM_PLATFORM
|
|
|
|
struct gbm_device;
|
|
|
|
|
|
|
|
_EGLDisplay*
|
|
|
|
_eglGetGbmDisplay(struct gbm_device *native_display,
|
2017-11-16 13:27:27 -05:00
|
|
|
const EGLAttrib *attrib_list);
|
2014-01-23 07:26:10 -08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_WAYLAND_PLATFORM
|
|
|
|
struct wl_display;
|
|
|
|
|
|
|
|
_EGLDisplay*
|
|
|
|
_eglGetWaylandDisplay(struct wl_display *native_display,
|
2017-11-16 13:27:27 -05:00
|
|
|
const EGLAttrib *attrib_list);
|
2014-01-23 07:26:10 -08:00
|
|
|
#endif
|
2010-01-24 20:30:04 +08:00
|
|
|
|
2016-10-12 15:48:15 -07:00
|
|
|
_EGLDisplay*
|
|
|
|
_eglGetSurfacelessDisplay(void *native_display,
|
2017-11-16 13:27:27 -05:00
|
|
|
const EGLAttrib *attrib_list);
|
2015-05-13 17:13:37 -05:00
|
|
|
|
2019-06-28 15:21:08 +08:00
|
|
|
#ifdef HAVE_ANDROID_PLATFORM
|
|
|
|
_EGLDisplay*
|
|
|
|
_eglGetAndroidDisplay(void *native_display,
|
|
|
|
const EGLAttrib *attrib_list);
|
|
|
|
#endif
|
|
|
|
|
2025-04-06 01:33:19 +08:00
|
|
|
#ifdef HAVE_OHOS_PLATFORM
|
|
|
|
_EGLDisplay*
|
|
|
|
_eglGetOHOSDisplay(void *native_display,
|
|
|
|
const EGLAttrib *attrib_list);
|
|
|
|
#endif
|
|
|
|
|
2019-05-16 18:01:40 +01:00
|
|
|
_EGLDisplay*
|
|
|
|
_eglGetDeviceDisplay(void *native_display,
|
|
|
|
const EGLAttrib *attrib_list);
|
|
|
|
|
2015-05-13 17:13:37 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-04-22 21:09:39 +00:00
|
|
|
#endif /* EGLDISPLAY_INCLUDED */
|