1f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/************************************************************************** 2f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 3f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. 4f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> 5f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Copyright 2010-2011 LunarG, Inc. 6f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * All Rights Reserved. 7f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 8f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Permission is hereby granted, free of charge, to any person obtaining a 9f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * copy of this software and associated documentation files (the 10f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * "Software"), to deal in the Software without restriction, including 11f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * without limitation the rights to use, copy, modify, merge, publish, 12f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * distribute, sub license, and/or sell copies of the Software, and to 13f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * permit persons to whom the Software is furnished to do so, subject to 14f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * the following conditions: 15f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 16f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * The above copyright notice and this permission notice (including the 17f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * next paragraph) shall be included in all copies or substantial portions 18f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * of the Software. 19f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 20f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * DEALINGS IN THE SOFTWARE. 27f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 28f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org **************************************************************************/ 29f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 30f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 31f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#ifndef EGLDISPLAY_INCLUDED 32f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define EGLDISPLAY_INCLUDED 33f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 34f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 35f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include "egltypedefs.h" 36f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include "egldefines.h" 37f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include "eglmutex.h" 38f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include "eglarray.h" 39f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 40f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 41f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgenum _egl_platform_type { 42f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_PLATFORM_WINDOWS, 43f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_PLATFORM_X11, 44f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_PLATFORM_WAYLAND, 45f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_PLATFORM_DRM, 46f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_PLATFORM_FBDEV, 47f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_PLATFORM_NULL, 48f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_PLATFORM_ANDROID, 49f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 50f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_NUM_PLATFORMS, 51f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_INVALID_PLATFORM = -1 52f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org}; 53f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgtypedef enum _egl_platform_type _EGLPlatformType; 54f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 55f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 56f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgenum _egl_resource_type { 57f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_RESOURCE_CONTEXT, 58f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_RESOURCE_SURFACE, 59f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_RESOURCE_IMAGE, 60f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_RESOURCE_SYNC, 61f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 62f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGL_NUM_RESOURCES 63f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org}; 64f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/* this cannot and need not go into egltypedefs.h */ 65f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgtypedef enum _egl_resource_type _EGLResourceType; 66f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 67f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 68f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/** 69f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * A resource of a display. 70f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 71f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct _egl_resource 72f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org{ 73f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* which display the resource belongs to */ 74f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGLDisplay *Display; 75f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean IsLinked; 76f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLint RefCount; 77f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 78f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* used to link resources of the same type */ 79f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGLResource *Next; 80f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org}; 81f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 82f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 83f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/** 84f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Optional EGL extensions info. 85f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 86f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct _egl_extensions 87f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org{ 88f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean MESA_screen_surface; 89f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean MESA_copy_context; 90f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean MESA_drm_display; 91f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean MESA_drm_image; 92f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 93f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean WL_bind_wayland_display; 94f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 95f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean KHR_image_base; 96f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean KHR_image_pixmap; 97f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean KHR_vg_parent_image; 98f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean KHR_gl_texture_2D_image; 99f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean KHR_gl_texture_cubemap_image; 100f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean KHR_gl_texture_3D_image; 101f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean KHR_gl_renderbuffer_image; 102f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 103f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean KHR_reusable_sync; 104f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean KHR_fence_sync; 105f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 106f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean KHR_surfaceless_context; 107f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean KHR_create_context; 108f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 109f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean NOK_swap_region; 110f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean NOK_texture_from_pixmap; 111f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 112f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean ANDROID_image_native_buffer; 113f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 114f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean NV_post_sub_buffer; 115f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 116f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean EXT_create_context_robustness; 117f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org}; 118f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 119f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 120f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct _egl_display 121f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org{ 122f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* used to link displays */ 123f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGLDisplay *Next; 124f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 125f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGLMutex Mutex; 126f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 127f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGLPlatformType Platform; /**< The type of the platform display */ 128f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org void *PlatformDisplay; /**< A pointer to the platform display */ 129f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 130f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGLDriver *Driver; /**< Matched driver of the display */ 131f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean Initialized; /**< True if the display is initialized */ 132f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 133f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* options that affect how the driver initializes the display */ 134f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org struct { 135f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean TestOnly; /**< Driver should not set fields when true */ 136f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLBoolean UseFallback; /**< Use fallback driver (sw or less features) */ 137f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org } Options; 138f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 139f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* these fields are set by the driver during init */ 140f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org void *DriverData; /**< Driver private data */ 141f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLint VersionMajor; /**< EGL major version */ 142f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLint VersionMinor; /**< EGL minor version */ 143f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org EGLint ClientAPIs; /**< Bitmask of APIs supported (EGL_xxx_BIT) */ 144f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGLExtensions Extensions; /**< Extensions supported */ 145f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 146f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* these fields are derived from above */ 147f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org char VersionString[1000]; /**< EGL_VERSION */ 148f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org char ClientAPIsString[1000]; /**< EGL_CLIENT_APIS */ 149f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org char ExtensionsString[_EGL_MAX_EXTENSIONS_LEN]; /**< EGL_EXTENSIONS */ 150f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 151f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGLArray *Screens; 152f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGLArray *Configs; 153f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 154f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org /* lists of resources */ 155f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGLResource *ResourceLists[_EGL_NUM_RESOURCES]; 156f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org}; 157f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 158f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 159f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern _EGLPlatformType 160f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglGetNativePlatform(EGLNativeDisplayType nativeDisplay); 161f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 162f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 163f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void 164f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglFiniDisplay(void); 165f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 166f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 167f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern _EGLDisplay * 168f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglFindDisplay(_EGLPlatformType plat, void *plat_dpy); 169f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 170f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 171f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgPUBLIC void 172f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglReleaseDisplayResources(_EGLDriver *drv, _EGLDisplay *dpy); 173f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 174f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 175f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgPUBLIC void 176f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglCleanupDisplay(_EGLDisplay *disp); 177f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 178f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 179f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern EGLBoolean 180f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglCheckDisplayHandle(EGLDisplay dpy); 181f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 182f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 183f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgPUBLIC EGLBoolean 184f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglCheckResource(void *res, _EGLResourceType type, _EGLDisplay *dpy); 185f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 186f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 187f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/** 188f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Lookup a handle to find the linked display. 189f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Return NULL if the handle has no corresponding linked display. 190f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 191f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstatic INLINE _EGLDisplay * 192f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglLookupDisplay(EGLDisplay display) 193f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org{ 194f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org _EGLDisplay *dpy = (_EGLDisplay *) display; 195f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org if (!_eglCheckDisplayHandle(display)) 196f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org dpy = NULL; 197f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org return dpy; 198f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org} 199f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 200f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 201f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/** 202f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Return the handle of a linked display, or EGL_NO_DISPLAY. 203f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 204f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstatic INLINE EGLDisplay 205f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglGetDisplayHandle(_EGLDisplay *dpy) 206f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org{ 207f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org return (EGLDisplay) ((dpy) ? dpy : EGL_NO_DISPLAY); 208f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org} 209f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 210f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 211f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void 212f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglInitResource(_EGLResource *res, EGLint size, _EGLDisplay *dpy); 213f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 214f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 215f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgPUBLIC void 216f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglGetResource(_EGLResource *res); 217f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 218f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 219f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgPUBLIC EGLBoolean 220f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglPutResource(_EGLResource *res); 221f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 222f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 223f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void 224f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglLinkResource(_EGLResource *res, _EGLResourceType type); 225f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 226f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 227f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void 228f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglUnlinkResource(_EGLResource *res, _EGLResourceType type); 229f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 230f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 231f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/** 232f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Return true if the resource is linked. 233f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 234f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstatic INLINE EGLBoolean 235f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_eglIsResourceLinked(_EGLResource *res) 236f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org{ 237f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org return res->IsLinked; 238f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org} 239f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 240f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 241f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#endif /* EGLDISPLAY_INCLUDED */ 242