1 /**************************************************************************
3 * Copyright 2015, 2018 Collabora
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
29 #ifndef EGLDEVICE_INCLUDED
30 #define EGLDEVICE_INCLUDED
35 #include "egltypedefs.h"
41 extern _EGLDevice _eglSoftwareDevice
;
47 _eglCheckDeviceHandle(EGLDeviceEXT device
);
49 static inline _EGLDevice
*
50 _eglLookupDevice(EGLDeviceEXT device
)
52 _EGLDevice
*dev
= (_EGLDevice
*) device
;
53 if (!_eglCheckDeviceHandle(device
))
59 _eglAddDevice(int fd
, bool software
);
61 enum _egl_device_extension
{
66 typedef enum _egl_device_extension _EGLDeviceExtension
;
69 _eglDeviceSupports(_EGLDevice
*dev
, _EGLDeviceExtension ext
);
72 _eglGetDRMDeviceRenderNode(_EGLDevice
*dev
);
75 _eglQueryDeviceAttribEXT(_EGLDevice
*dev
, EGLint attribute
,
79 _eglQueryDeviceStringEXT(_EGLDevice
*dev
, EGLint name
);
82 _eglQueryDevicesEXT(EGLint max_devices
, _EGLDevice
**devices
,
89 #endif /* EGLDEVICE_INCLUDED */