}
EGLBoolean
-dri2_add_pbuffer_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_add_pbuffer_configs_for_visuals(const _EGLDriver *drv, _EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
unsigned int format_count[ARRAY_SIZE(dri2_pbuffer_visuals)] = { 0 };
* called many times (without a eglTerminate in between).
*/
static EGLBoolean
-dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize(const _EGLDriver *drv, _EGLDisplay *disp)
{
EGLBoolean ret = EGL_FALSE;
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
* called many times (without a eglInitialize in between).
*/
static EGLBoolean
-dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_terminate(const _EGLDriver *drv, _EGLDisplay *disp)
{
/* Release all non-current Context/Surfaces. */
_eglReleaseDisplayResources(drv, disp);
* Called via eglCreateContext(), drv->CreateContext().
*/
static _EGLContext *
-dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
+dri2_create_context(const _EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
_EGLContext *share_list, const EGLint *attrib_list)
{
struct dri2_egl_context *dri2_ctx;
* Called via eglDestroyContext(), drv->DestroyContext().
*/
static EGLBoolean
-dri2_destroy_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
+dri2_destroy_context(const _EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
{
struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+dri2_destroy_surface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
* Called via eglMakeCurrent(), drv->MakeCurrent().
*/
static EGLBoolean
-dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
+dri2_make_current(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
_EGLSurface *rsurf, _EGLContext *ctx)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
* Called from eglGetProcAddress() via drv->GetProcAddress().
*/
static _EGLProc
-dri2_get_proc_address(_EGLDriver *drv, const char *procname)
+dri2_get_proc_address(const _EGLDriver *drv, const char *procname)
{
return _glapi_get_proc_address(procname);
}
static _EGLSurface*
-dri2_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_create_window_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list)
{
}
static _EGLSurface*
-dri2_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_create_pixmap_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_pixmap,
const EGLint *attrib_list)
{
}
static _EGLSurface*
-dri2_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_create_pbuffer_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, const EGLint *attrib_list)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_swap_interval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+dri2_swap_interval(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint interval)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+dri2_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
__DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf);
}
static EGLBoolean
-dri2_swap_buffers_with_damage(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_swap_buffers_with_damage(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf,
const EGLint *rects, EGLint n_rects)
{
}
static EGLBoolean
-dri2_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+dri2_swap_buffers_region(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint numRects, const EGLint *rects)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_set_damage_region(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+dri2_set_damage_region(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint *rects, EGLint n_rects)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_post_sub_buffer(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+dri2_post_sub_buffer(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint x, EGLint y, EGLint width, EGLint height)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_copy_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+dri2_copy_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
void *native_pixmap_target)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLint
-dri2_query_buffer_age(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+dri2_query_buffer_age(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
if (!dri2_dpy->vtbl->query_buffer_age)
}
static EGLBoolean
-dri2_wait_client(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
+dri2_wait_client(const _EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
_EGLSurface *surf = ctx->DrawSurface;
}
static EGLBoolean
-dri2_wait_native(_EGLDriver *drv, _EGLDisplay *disp, EGLint engine)
+dri2_wait_native(const _EGLDriver *drv, _EGLDisplay *disp, EGLint engine)
{
(void) drv;
(void) disp;
}
static EGLBoolean
-dri2_bind_tex_image(_EGLDriver *drv,
+dri2_bind_tex_image(const _EGLDriver *drv,
_EGLDisplay *disp, _EGLSurface *surf, EGLint buffer)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_release_tex_image(_EGLDriver *drv,
+dri2_release_tex_image(const _EGLDriver *drv,
_EGLDisplay *disp, _EGLSurface *surf, EGLint buffer)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static _EGLImage*
-dri2_create_image(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx,
+dri2_create_image(const _EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx,
EGLenum target, EGLClientBuffer buffer,
const EGLint *attr_list)
{
}
static EGLBoolean
-dri2_query_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+dri2_query_surface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint attribute, EGLint *value)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static struct wl_buffer*
-dri2_create_wayland_buffer_from_image(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_create_wayland_buffer_from_image(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLImage *img)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_query_dma_buf_formats(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_query_dma_buf_formats(const _EGLDriver *drv, _EGLDisplay *disp,
EGLint max, EGLint *formats, EGLint *count)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_query_dma_buf_modifiers(_EGLDriver *drv, _EGLDisplay *disp, EGLint format,
+dri2_query_dma_buf_modifiers(const _EGLDriver *drv, _EGLDisplay *disp, EGLint format,
EGLint max, EGLuint64KHR *modifiers,
EGLBoolean *external_only, EGLint *count)
{
return res;
}
static _EGLImage *
-dri2_create_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_create_drm_image_mesa(const _EGLDriver *drv, _EGLDisplay *disp,
const EGLint *attr_list)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_export_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img,
+dri2_export_drm_image_mesa(const _EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img,
EGLint *name, EGLint *handle, EGLint *stride)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_export_dma_buf_image_query_mesa(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_export_dma_buf_image_query_mesa(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLImage *img,
EGLint *fourcc, EGLint *nplanes,
EGLuint64KHR *modifiers)
}
static EGLBoolean
-dri2_export_dma_buf_image_mesa(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img,
+dri2_export_dma_buf_image_mesa(const _EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img,
int *fds, EGLint *strides, EGLint *offsets)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
#endif
_EGLImage *
-dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx, EGLenum target,
EGLClientBuffer buffer, const EGLint *attr_list)
{
}
static EGLBoolean
-dri2_destroy_image_khr(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *image)
+dri2_destroy_image_khr(const _EGLDriver *drv, _EGLDisplay *disp, _EGLImage *image)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_image *dri2_img = dri2_egl_image(image);
}
static EGLBoolean
-dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_bind_wayland_display_wl(const _EGLDriver *drv, _EGLDisplay *disp,
struct wl_display *wl_dpy)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_unbind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_unbind_wayland_display_wl(const _EGLDriver *drv, _EGLDisplay *disp,
struct wl_display *wl_dpy)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_query_wayland_buffer_wl(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_query_wayland_buffer_wl(const _EGLDriver *drv, _EGLDisplay *disp,
struct wl_resource *buffer_resource,
EGLint attribute, EGLint *value)
{
}
static _EGLSync *
-dri2_create_sync(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_create_sync(const _EGLDriver *drv, _EGLDisplay *disp,
EGLenum type, const EGLAttrib *attrib_list)
{
_EGLContext *ctx = _eglGetCurrentContext();
}
static EGLBoolean
-dri2_destroy_sync(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync)
+dri2_destroy_sync(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_sync *dri2_sync = dri2_egl_sync(sync);
}
static EGLint
-dri2_dup_native_fence_fd(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync)
+dri2_dup_native_fence_fd(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_sync *dri2_sync = dri2_egl_sync(sync);
}
static void
-dri2_set_blob_cache_funcs(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_set_blob_cache_funcs(const _EGLDriver *drv, _EGLDisplay *disp,
EGLSetBlobFuncANDROID set,
EGLGetBlobFuncANDROID get)
{
}
static EGLint
-dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync,
+dri2_client_wait_sync(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync,
EGLint flags, EGLTime timeout)
{
_EGLContext *ctx = _eglGetCurrentContext();
}
static EGLBoolean
-dri2_signal_sync(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync,
+dri2_signal_sync(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync,
EGLenum mode)
{
struct dri2_egl_sync *dri2_sync = dri2_egl_sync(sync);
}
static EGLint
-dri2_server_wait_sync(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync)
+dri2_server_wait_sync(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync)
{
_EGLContext *ctx = _eglGetCurrentContext();
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
return dri2_dpy->interop->export_object(dri2_ctx->dri_context, in, out);
}
-_EGLDriver _eglDriver = {
+const _EGLDriver _eglDriver = {
.Initialize = dri2_initialize,
.Terminate = dri2_terminate,
.CreateContext = dri2_create_context,
int (*authenticate)(_EGLDisplay *disp, uint32_t id);
/* mandatory */
- _EGLSurface* (*create_window_surface)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface* (*create_window_surface)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *config,
void *native_window,
const EGLint *attrib_list);
/* optional */
- _EGLSurface* (*create_pixmap_surface)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface* (*create_pixmap_surface)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *config,
void *native_pixmap,
const EGLint *attrib_list);
/* optional */
- _EGLSurface* (*create_pbuffer_surface)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface* (*create_pbuffer_surface)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *config,
const EGLint *attrib_list);
/* mandatory */
- EGLBoolean (*destroy_surface)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*destroy_surface)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface);
/* optional */
- EGLBoolean (*swap_interval)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*swap_interval)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint interval);
/* mandatory */
- _EGLImage* (*create_image)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLImage* (*create_image)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx, EGLenum target,
EGLClientBuffer buffer,
const EGLint *attr_list);
/* mandatory */
- EGLBoolean (*swap_buffers)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*swap_buffers)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf);
/* optional - falls back to .swap_buffers */
- EGLBoolean (*swap_buffers_with_damage)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*swap_buffers_with_damage)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface,
const EGLint *rects, EGLint n_rects);
/* optional */
- EGLBoolean (*swap_buffers_region)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*swap_buffers_region)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint numRects,
const EGLint *rects);
/* optional */
- EGLBoolean (*post_sub_buffer)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*post_sub_buffer)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf,
EGLint x, EGLint y,
EGLint width, EGLint height);
/* optional */
- EGLBoolean (*copy_buffers)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*copy_buffers)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, void *native_pixmap_target);
/* optional */
- EGLint (*query_buffer_age)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLint (*query_buffer_age)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf);
/* optional */
- EGLBoolean (*query_surface)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*query_surface)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint attribute,
EGLint *value);
/* optional */
struct wl_buffer* (*create_wayland_buffer_from_image)(
- _EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img);
+ const _EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img);
/* optional */
EGLBoolean (*get_sync_values)(_EGLDisplay *display, _EGLSurface *surface,
const int *rgba_shifts, const unsigned int *rgba_sizes);
EGLBoolean
-dri2_add_pbuffer_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp);
+dri2_add_pbuffer_configs_for_visuals(const _EGLDriver *drv, _EGLDisplay *disp);
_EGLImage *
-dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx, EGLenum target,
EGLClientBuffer buffer, const EGLint *attr_list);
#ifdef HAVE_X11_PLATFORM
EGLBoolean
-dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp);
+dri2_initialize_x11(const _EGLDriver *drv, _EGLDisplay *disp);
void
dri2_teardown_x11(struct dri2_egl_display *dri2_dpy);
unsigned int
dri2_x11_get_red_mask_for_depth(struct dri2_egl_display *dri2_dpy, int depth);
#else
static inline EGLBoolean
-dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_x11(const _EGLDriver *drv, _EGLDisplay *disp)
{
return _eglError(EGL_NOT_INITIALIZED, "X11 platform not built");
}
#ifdef HAVE_DRM_PLATFORM
EGLBoolean
-dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp);
+dri2_initialize_drm(const _EGLDriver *drv, _EGLDisplay *disp);
void
dri2_teardown_drm(struct dri2_egl_display *dri2_dpy);
#else
static inline EGLBoolean
-dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_drm(const _EGLDriver *drv, _EGLDisplay *disp)
{
return _eglError(EGL_NOT_INITIALIZED, "GBM/DRM platform not built");
}
#ifdef HAVE_WAYLAND_PLATFORM
EGLBoolean
-dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp);
+dri2_initialize_wayland(const _EGLDriver *drv, _EGLDisplay *disp);
void
dri2_teardown_wayland(struct dri2_egl_display *dri2_dpy);
bool
dri2_wl_is_format_supported(void* user_data, uint32_t format);
#else
static inline EGLBoolean
-dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_wayland(const _EGLDriver *drv, _EGLDisplay *disp)
{
return _eglError(EGL_NOT_INITIALIZED, "Wayland platform not built");
}
#ifdef HAVE_ANDROID_PLATFORM
EGLBoolean
-dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *disp);
+dri2_initialize_android(const _EGLDriver *drv, _EGLDisplay *disp);
#else
static inline EGLBoolean
-dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_android(const _EGLDriver *drv, _EGLDisplay *disp)
{
return _eglError(EGL_NOT_INITIALIZED, "Android platform not built");
}
#endif
EGLBoolean
-dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp);
+dri2_initialize_surfaceless(const _EGLDriver *drv, _EGLDisplay *disp);
EGLBoolean
-dri2_initialize_device(_EGLDriver *drv, _EGLDisplay *disp);
+dri2_initialize_device(const _EGLDriver *drv, _EGLDisplay *disp);
static inline void
dri2_teardown_device(struct dri2_egl_display *dri2_dpy) { /* noop */ }
EGLenum colorspace);
static inline void
-dri2_set_WL_bind_wayland_display(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_set_WL_bind_wayland_display(const _EGLDriver *drv, _EGLDisplay *disp)
{
#ifdef HAVE_WAYLAND_PLATFORM
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static _EGLSurface *
-droid_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
+droid_create_surface(const _EGLDriver *drv, _EGLDisplay *disp, EGLint type,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list)
{
}
static _EGLSurface *
-droid_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
+droid_create_window_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list)
{
}
static _EGLSurface *
-droid_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
+droid_create_pbuffer_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, const EGLint *attrib_list)
{
return droid_create_surface(drv, disp, EGL_PBUFFER_BIT, conf,
}
static EGLBoolean
-droid_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+droid_destroy_surface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
}
static EGLBoolean
-droid_swap_interval(_EGLDriver *drv, _EGLDisplay *disp,
+droid_swap_interval(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint interval)
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
}
static EGLint
-droid_query_buffer_age(_EGLDriver *drv,
+droid_query_buffer_age(const _EGLDriver *drv,
_EGLDisplay *disp, _EGLSurface *surface)
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surface);
}
static EGLBoolean
-droid_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+droid_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
#endif /* HAVE_DRM_GRALLOC */
static EGLBoolean
-droid_query_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+droid_query_surface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint attribute, EGLint *value)
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
}
static _EGLImage *
-droid_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
+droid_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx, EGLenum target,
EGLClientBuffer buffer, const EGLint *attr_list)
{
}
static EGLBoolean
-droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp)
+droid_add_configs_for_visuals(const _EGLDriver *drv, _EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
static const struct {
#endif
EGLBoolean
-dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_android(const _EGLDriver *drv, _EGLDisplay *disp)
{
_EGLDevice *dev;
bool device_opened = false;
}
static _EGLSurface *
-dri2_device_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
+dri2_device_create_surface(const _EGLDriver *drv, _EGLDisplay *disp, EGLint type,
_EGLConfig *conf, const EGLint *attrib_list)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-device_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+device_destroy_surface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
}
static _EGLSurface *
-dri2_device_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_device_create_pbuffer_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, const EGLint *attrib_list)
{
return dri2_device_create_surface(drv, disp, EGL_PBUFFER_BIT, conf,
}
EGLBoolean
-dri2_initialize_device(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_device(const _EGLDriver *drv, _EGLDisplay *disp)
{
_EGLDevice *dev;
struct dri2_egl_display *dri2_dpy;
}
static _EGLSurface *
-dri2_drm_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_drm_create_window_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_surface,
const EGLint *attrib_list)
{
}
static _EGLSurface *
-dri2_drm_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_drm_create_pixmap_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list)
{
}
static EGLBoolean
-dri2_drm_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+dri2_drm_destroy_surface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
}
static EGLBoolean
-dri2_drm_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+dri2_drm_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
}
static EGLint
-dri2_drm_query_buffer_age(_EGLDriver *drv,
+dri2_drm_query_buffer_age(const _EGLDriver *drv,
_EGLDisplay *disp, _EGLSurface *surface)
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surface);
}
static _EGLImage *
-dri2_drm_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_drm_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx, EGLenum target,
EGLClientBuffer buffer, const EGLint *attr_list)
{
}
static EGLBoolean
-drm_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp)
+drm_add_configs_for_visuals(const _EGLDriver *drv, _EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
const struct gbm_dri_visual *visuals = dri2_dpy->gbm_dri->visual_table;
};
EGLBoolean
-dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_drm(const _EGLDriver *drv, _EGLDisplay *disp)
{
_EGLDevice *dev;
struct dri2_egl_display *dri2_dpy;
}
static _EGLSurface *
-dri2_surfaceless_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
+dri2_surfaceless_create_surface(const _EGLDriver *drv, _EGLDisplay *disp, EGLint type,
_EGLConfig *conf, const EGLint *attrib_list)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-surfaceless_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+surfaceless_destroy_surface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
}
static _EGLSurface *
-dri2_surfaceless_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_surfaceless_create_pbuffer_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, const EGLint *attrib_list)
{
return dri2_surfaceless_create_surface(drv, disp, EGL_PBUFFER_BIT, conf,
}
EGLBoolean
-dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_surfaceless(const _EGLDriver *drv, _EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy;
const char* err;
* Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
-dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_wl_create_window_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list)
{
}
static _EGLSurface *
-dri2_wl_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_wl_create_pixmap_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list)
{
* Called via eglDestroySurface(), drv->DestroySurface().
*/
static EGLBoolean
-dri2_wl_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+dri2_wl_destroy_surface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
* Called via eglSwapBuffers(), drv->SwapBuffers().
*/
static EGLBoolean
-dri2_wl_swap_buffers_with_damage(_EGLDriver *drv,
+dri2_wl_swap_buffers_with_damage(const _EGLDriver *drv,
_EGLDisplay *disp,
_EGLSurface *draw,
const EGLint *rects,
}
static EGLint
-dri2_wl_query_buffer_age(_EGLDriver *drv,
+dri2_wl_query_buffer_age(const _EGLDriver *drv,
_EGLDisplay *disp, _EGLSurface *surface)
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surface);
}
static EGLBoolean
-dri2_wl_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+dri2_wl_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
{
return dri2_wl_swap_buffers_with_damage(drv, disp, draw, NULL, 0);
}
static struct wl_buffer *
-dri2_wl_create_wayland_buffer_from_image(_EGLDriver *drv,
+dri2_wl_create_wayland_buffer_from_image(const _EGLDriver *drv,
_EGLDisplay *disp,
_EGLImage *img)
{
};
static EGLBoolean
-dri2_wl_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_wl_add_configs_for_visuals(const _EGLDriver *drv, _EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
unsigned int format_count[ARRAY_SIZE(dri2_wl_visuals)] = { 0 };
}
static EGLBoolean
-dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_wayland_drm(const _EGLDriver *drv, _EGLDisplay *disp)
{
_EGLDevice *dev;
struct dri2_egl_display *dri2_dpy;
}
static EGLBoolean
-dri2_wl_swrast_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+dri2_wl_swrast_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
};
static EGLBoolean
-dri2_initialize_wayland_swrast(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_wayland_swrast(const _EGLDriver *drv, _EGLDisplay *disp)
{
_EGLDevice *dev;
struct dri2_egl_display *dri2_dpy;
}
EGLBoolean
-dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_wayland(const _EGLDriver *drv, _EGLDisplay *disp)
{
EGLBoolean initialized = EGL_FALSE;
#endif
static EGLBoolean
-dri2_x11_swap_interval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+dri2_x11_swap_interval(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint interval);
uint32_t
* Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
-dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
+dri2_x11_create_surface(const _EGLDriver *drv, _EGLDisplay *disp, EGLint type,
_EGLConfig *conf, void *native_surface,
const EGLint *attrib_list)
{
* Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
-dri2_x11_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_x11_create_window_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list)
{
}
static _EGLSurface *
-dri2_x11_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_x11_create_pixmap_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_pixmap,
const EGLint *attrib_list)
{
}
static _EGLSurface *
-dri2_x11_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_x11_create_pbuffer_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, const EGLint *attrib_list)
{
return dri2_x11_create_surface(drv, disp, EGL_PBUFFER_BIT, conf,
}
static EGLBoolean
-dri2_x11_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+dri2_x11_destroy_surface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
* have.
*/
static EGLBoolean
-dri2_query_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_query_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint attribute,
EGLint *value)
{
}
static EGLBoolean
-dri2_copy_region(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_copy_region(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *draw, xcb_xfixes_region_t region)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static int64_t
-dri2_x11_swap_buffers_msc(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
+dri2_x11_swap_buffers_msc(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
int64_t msc, int64_t divisor, int64_t remainder)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_x11_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+dri2_x11_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
}
static EGLBoolean
-dri2_x11_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_x11_swap_buffers_region(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *draw,
EGLint numRects, const EGLint *rects)
{
}
static EGLBoolean
-dri2_x11_post_sub_buffer(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
+dri2_x11_post_sub_buffer(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
EGLint x, EGLint y, EGLint width, EGLint height)
{
const EGLint rect[4] = { x, y, width, height };
}
static EGLBoolean
-dri2_x11_swap_interval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+dri2_x11_swap_interval(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint interval)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static EGLBoolean
-dri2_x11_copy_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+dri2_x11_copy_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
void *native_pixmap_target)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
}
static _EGLImage *
-dri2_x11_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_x11_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx, EGLenum target,
EGLClientBuffer buffer, const EGLint *attr_list)
{
}
static EGLBoolean
-dri2_get_xcb_connection(_EGLDriver *drv, _EGLDisplay *disp,
+dri2_get_xcb_connection(const _EGLDriver *drv, _EGLDisplay *disp,
struct dri2_egl_display *dri2_dpy)
{
xcb_screen_iterator_t s;
}
static EGLBoolean
-dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_x11_swrast(const _EGLDriver *drv, _EGLDisplay *disp)
{
_EGLDevice *dev;
struct dri2_egl_display *dri2_dpy;
};
static EGLBoolean
-dri2_initialize_x11_dri3(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_x11_dri3(const _EGLDriver *drv, _EGLDisplay *disp)
{
_EGLDevice *dev;
struct dri2_egl_display *dri2_dpy;
};
static EGLBoolean
-dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_x11_dri2(const _EGLDriver *drv, _EGLDisplay *disp)
{
_EGLDevice *dev;
struct dri2_egl_display *dri2_dpy;
}
EGLBoolean
-dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp)
+dri2_initialize_x11(const _EGLDriver *drv, _EGLDisplay *disp)
{
EGLBoolean initialized = EGL_FALSE;
};
static EGLBoolean
-dri3_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+dri3_destroy_surface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri3_egl_surface *dri3_surf = dri3_egl_surface(surf);
}
static EGLBoolean
-dri3_set_swap_interval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+dri3_set_swap_interval(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint interval)
{
struct dri3_egl_surface *dri3_surf = dri3_egl_surface(surf);
}
static _EGLSurface *
-dri3_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
+dri3_create_surface(const _EGLDriver *drv, _EGLDisplay *disp, EGLint type,
_EGLConfig *conf, void *native_surface,
const EGLint *attrib_list)
{
* Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
-dri3_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri3_create_window_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list)
{
}
static _EGLSurface *
-dri3_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri3_create_pixmap_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_pixmap,
const EGLint *attrib_list)
{
}
static _EGLSurface *
-dri3_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri3_create_pbuffer_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, const EGLint *attrib_list)
{
return dri3_create_surface(drv, disp, EGL_PBUFFER_BIT, conf,
#endif
static _EGLImage *
-dri3_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
+dri3_create_image_khr(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx, EGLenum target,
EGLClientBuffer buffer, const EGLint *attr_list)
{
};
static EGLBoolean
-dri3_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+dri3_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
{
struct dri3_egl_surface *dri3_surf = dri3_egl_surface(draw);
}
static EGLBoolean
-dri3_copy_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+dri3_copy_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
void *native_pixmap_target)
{
struct dri3_egl_surface *dri3_surf = dri3_egl_surface(surf);
}
static int
-dri3_query_buffer_age(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+dri3_query_buffer_age(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri3_egl_surface *dri3_surf = dri3_egl_surface(surf);
}
static EGLBoolean
-dri3_query_surface(_EGLDriver *drv, _EGLDisplay *disp,
+dri3_query_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint attribute,
EGLint *value)
{
* Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
-haiku_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
+haiku_create_window_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window, const EGLint *attrib_list)
{
CALLED();
static _EGLSurface *
-haiku_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
+haiku_create_pixmap_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_pixmap, const EGLint *attrib_list)
{
return NULL;
static _EGLSurface *
-haiku_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
+haiku_create_pbuffer_surface(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, const EGLint *attrib_list)
{
return NULL;
static EGLBoolean
-haiku_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+haiku_destroy_surface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
if (_eglPutSurface(surf)) {
// XXX: detach haiku_egl_surface::gl from the native window and destroy it
extern "C"
EGLBoolean
-init_haiku(_EGLDriver *drv, _EGLDisplay *disp)
+init_haiku(const _EGLDriver *drv, _EGLDisplay *disp)
{
_EGLDevice *dev;
CALLED();
extern "C"
EGLBoolean
-haiku_terminate(_EGLDriver* drv,_EGLDisplay *disp)
+haiku_terminate(const _EGLDriver* drv,_EGLDisplay *disp)
{
return EGL_TRUE;
}
extern "C"
_EGLContext*
-haiku_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
+haiku_create_context(const _EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
_EGLContext *share_list, const EGLint *attrib_list)
{
CALLED();
extern "C"
EGLBoolean
-haiku_destroy_context(_EGLDriver* drv, _EGLDisplay *disp, _EGLContext* ctx)
+haiku_destroy_context(const _EGLDriver* drv, _EGLDisplay *disp, _EGLContext* ctx)
{
struct haiku_egl_context* context = haiku_egl_context(ctx);
extern "C"
EGLBoolean
-haiku_make_current(_EGLDriver* drv, _EGLDisplay *disp, _EGLSurface *dsurf,
+haiku_make_current(const _EGLDriver* drv, _EGLDisplay *disp, _EGLSurface *dsurf,
_EGLSurface *rsurf, _EGLContext *ctx)
{
CALLED();
extern "C"
EGLBoolean
-haiku_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+haiku_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct haiku_egl_surface* surface = haiku_egl_surface(surf);
extern "C"
-_EGLDriver _eglDriver = {
+const _EGLDriver _eglDriver = {
.Initialize = init_haiku,
.Terminate = haiku_terminate,
.CreateContext = haiku_create_context,
};
-static inline _EGLDriver *
+static inline const _EGLDriver *
_eglCheckDisplay(_EGLDisplay *disp, const char *msg)
{
if (!disp) {
}
-static inline _EGLDriver *
+static inline const _EGLDriver *
_eglCheckSurface(_EGLDisplay *disp, _EGLSurface *surf, const char *msg)
{
- _EGLDriver *drv = _eglCheckDisplay(disp, msg);
+ const _EGLDriver *drv = _eglCheckDisplay(disp, msg);
if (!drv)
return NULL;
if (!surf) {
}
-static inline _EGLDriver *
+static inline const _EGLDriver *
_eglCheckContext(_EGLDisplay *disp, _EGLContext *context, const char *msg)
{
- _EGLDriver *drv = _eglCheckDisplay(disp, msg);
+ const _EGLDriver *drv = _eglCheckDisplay(disp, msg);
if (!drv)
return NULL;
if (!context) {
}
-static inline _EGLDriver *
+static inline const _EGLDriver *
_eglCheckConfig(_EGLDisplay *disp, _EGLConfig *conf, const char *msg)
{
- _EGLDriver *drv = _eglCheckDisplay(disp, msg);
+ const _EGLDriver *drv = _eglCheckDisplay(disp, msg);
if (!drv)
return NULL;
if (!conf) {
}
-static inline _EGLDriver *
+static inline const _EGLDriver *
_eglCheckSync(_EGLDisplay *disp, _EGLSync *s, const char *msg)
{
- _EGLDriver *drv = _eglCheckDisplay(disp, msg);
+ const _EGLDriver *drv = _eglCheckDisplay(disp, msg);
if (!drv)
return NULL;
if (!s) {
RETURN_EGL_ERROR(NULL, EGL_BAD_DISPLAY, EGL_FALSE);
if (disp->Initialized) {
- _EGLDriver *drv = disp->Driver;
+ const _EGLDriver *drv = disp->Driver;
drv->Terminate(drv, disp);
/* do not reset disp->Driver */
eglQueryString(EGLDisplay dpy, EGLint name)
{
_EGLDisplay *disp;
- _EGLDriver *drv;
+ const _EGLDriver *drv;
#if !USE_LIBGLVND
if (dpy == EGL_NO_DISPLAY && name == EGL_EXTENSIONS) {
EGLint config_size, EGLint *num_config)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
EGLint config_size, EGLint *num_config)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLConfig *conf = _eglLookupConfig(config, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLConfig *conf = _eglLookupConfig(config, disp);
_EGLContext *share = _eglLookupContext(share_list, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
_EGLContext *context;
EGLContext ret;
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLContext *context = _eglLookupContext(ctx, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_CONTEXT_KHR, context, EGL_FALSE);
_EGLContext *context = _eglLookupContext(ctx, disp);
_EGLSurface *draw_surf = _eglLookupSurface(draw, disp);
_EGLSurface *read_surf = _eglLookupSurface(read, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_CONTEXT_KHR, context, EGL_FALSE);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLContext *context = _eglLookupContext(ctx, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_CONTEXT_KHR, context, EGL_FALSE);
void *native_window, const EGLint *attrib_list)
{
_EGLConfig *conf = _eglLookupConfig(config, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
_EGLSurface *surf;
EGLSurface ret;
void *native_pixmap, const EGLint *attrib_list)
{
_EGLConfig *conf = _eglLookupConfig(config, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
_EGLSurface *surf;
EGLSurface ret;
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLConfig *conf = _eglLookupConfig(config, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
_EGLSurface *surf;
EGLSurface ret;
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSurface *surf = _eglLookupSurface(surface, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSurface *surf = _eglLookupSurface(surface, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSurface *surf = _eglLookupSurface(surface, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSurface *surf = _eglLookupSurface(surface, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSurface *surf = _eglLookupSurface(surface, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLContext *ctx = _eglGetCurrentContext();
_EGLSurface *surf = ctx ? ctx->DrawSurface : NULL;
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGLContext *ctx = _eglGetCurrentContext();
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSurface *surf = _eglLookupSurface(surface, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
const EGLint *rects, EGLint n_rects)
{
_EGLContext *ctx = _eglGetCurrentContext();
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
_EGLSurface *surf = _eglLookupSurface(surface, disp);
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGLContext *ctx = _eglGetCurrentContext();
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSurface *surf = _eglLookupSurface(surface, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
void *native_pixmap_ptr;
{
_EGLContext *ctx = _eglGetCurrentContext();
_EGLDisplay *disp;
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
if (!ctx)
{
_EGLContext *ctx = _eglGetCurrentContext();
_EGLDisplay *disp;
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
if (!ctx)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLConfig *conf = _eglLookupConfig(config, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
_EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_SURFACE);
if (ctx) {
_EGLDisplay *disp = ctx->Resource.Display;
- _EGLDriver *drv;
+ const _EGLDriver *drv;
mtx_lock(&disp->Mutex);
drv = disp->Driver;
EGLClientBuffer buffer, const EGLint *attr_list)
{
_EGLContext *context = _eglLookupContext(ctx, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
_EGLImage *img;
EGLImage ret;
static EGLBoolean
_eglDestroyImageCommon(_EGLDisplay *disp, _EGLImage *img)
{
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
EGLenum invalid_type_error)
{
_EGLContext *ctx = _eglGetCurrentContext();
- _EGLDriver *drv;
+ const _EGLDriver *drv;
_EGLSync *sync;
EGLSync ret;
static EGLBoolean
_eglDestroySync(_EGLDisplay *disp, _EGLSync *s)
{
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
_eglClientWaitSyncCommon(_EGLDisplay *disp, EGLDisplay dpy,
_EGLSync *s, EGLint flags, EGLTime timeout)
{
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLint ret;
_EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
_eglWaitSyncCommon(_EGLDisplay *disp, _EGLSync *s, EGLint flags)
{
_EGLContext *ctx = _eglGetCurrentContext();
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLint ret;
_EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSync *s = _eglLookupSync(sync, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE);
static EGLBoolean
_eglGetSyncAttribCommon(_EGLDisplay *disp, _EGLSync *s, EGLint attribute, EGLAttrib *value)
{
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSync *s = _eglLookupSync(sync, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE);
_EGLContext *ctx = _eglGetCurrentContext();
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSurface *surf = _eglLookupSurface(surface, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attr_list)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
_EGLImage *img;
EGLImage ret;
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLImage *img = _eglLookupImage(image, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_IMAGE_KHR, img, EGL_FALSE);
eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
EGLint attribute, EGLint *value)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLImage *img;
- _EGLDriver *drv;
+ const _EGLDriver *drv;
struct wl_buffer *ret;
_EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSurface *surf = _eglLookupSurface(surface, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSurface *surf = _eglLookupSurface(surface, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLImage *img = _eglLookupImage(image, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_IMAGE_KHR, img, EGL_FALSE);
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLImage *img = _eglLookupImage(image, disp);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(disp, EGL_OBJECT_IMAGE_KHR, img, EGL_FALSE);
EGLint *formats, EGLint *num_formats)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(NULL, EGL_NONE, NULL, EGL_FALSE);
EGLint *num_modifiers)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
EGLBoolean ret;
_EGL_FUNC_START(NULL, EGL_NONE, NULL, EGL_FALSE);
return;
}
- _EGLDriver *drv = _eglCheckDisplay(disp, __func__);
+ const _EGLDriver *drv = _eglCheckDisplay(disp, __func__);
if (!drv) {
if (disp)
_eglUnlockDisplay(disp);
EGLAttrib *value)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
_EGL_FUNC_START(NULL, EGL_NONE, NULL, EGL_FALSE);
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
eglGetDisplayDriverConfig(EGLDisplay dpy)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
char *ret;
_EGL_FUNC_START(disp, EGL_NONE, NULL, NULL);
eglGetDisplayDriverName(EGLDisplay dpy)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLDriver *drv;
+ const _EGLDriver *drv;
const char *ret;
_EGL_FUNC_START(disp, EGL_NONE, NULL, NULL);
static int
_eglLockDisplayInterop(EGLDisplay dpy, EGLContext context,
- _EGLDisplay **disp, _EGLDriver **drv,
+ _EGLDisplay **disp, const _EGLDriver **drv,
_EGLContext **ctx)
{
struct mesa_glinterop_device_info *out)
{
_EGLDisplay *disp;
- _EGLDriver *drv;
+ const _EGLDriver *drv;
_EGLContext *ctx;
int ret;
struct mesa_glinterop_export_out *out)
{
_EGLDisplay *disp;
- _EGLDriver *drv;
+ const _EGLDriver *drv;
_EGLContext *ctx;
int ret;
* Typical fallback routine for eglChooseConfig
*/
EGLBoolean
-_eglChooseConfig(_EGLDriver *drv, _EGLDisplay *disp, const EGLint *attrib_list,
+_eglChooseConfig(const _EGLDriver *drv, _EGLDisplay *disp, const EGLint *attrib_list,
EGLConfig *configs, EGLint config_size, EGLint *num_configs)
{
_EGLConfig criteria;
* Fallback for eglGetConfigAttrib.
*/
EGLBoolean
-_eglGetConfigAttrib(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
+_eglGetConfigAttrib(const _EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
EGLint attribute, EGLint *value)
{
if (!_eglIsConfigAttribValid(conf, attribute))
* Fallback for eglGetConfigs.
*/
EGLBoolean
-_eglGetConfigs(_EGLDriver *drv, _EGLDisplay *disp, EGLConfig *configs,
+_eglGetConfigs(const _EGLDriver *drv, _EGLDisplay *disp, EGLConfig *configs,
EGLint config_size, EGLint *num_config)
{
*num_config = _eglFlattenArray(disp->Configs, (void *) configs,
extern EGLBoolean
-_eglChooseConfig(_EGLDriver *drv, _EGLDisplay *disp, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
+_eglChooseConfig(const _EGLDriver *drv, _EGLDisplay *disp, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
extern EGLBoolean
-_eglGetConfigAttrib(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf, EGLint attribute, EGLint *value);
+_eglGetConfigAttrib(const _EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf, EGLint attribute, EGLint *value);
extern EGLBoolean
-_eglGetConfigs(_EGLDriver *drv, _EGLDisplay *disp, EGLConfig *configs, EGLint config_size, EGLint *num_config);
+_eglGetConfigs(const _EGLDriver *drv, _EGLDisplay *disp, EGLConfig *configs, EGLint config_size, EGLint *num_config);
#ifdef __cplusplus
EGLBoolean
-_eglQueryContext(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *c,
+_eglQueryContext(const _EGLDriver *drv, _EGLDisplay *disp, _EGLContext *c,
EGLint attribute, EGLint *value)
{
(void) drv;
extern EGLBoolean
-_eglQueryContext(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx, EGLint attribute, EGLint *value);
+_eglQueryContext(const _EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx, EGLint attribute, EGLint *value);
extern EGLBoolean
* Destroy the contexts and surfaces that are linked to the display.
*/
void
-_eglReleaseDisplayResources(_EGLDriver *drv, _EGLDisplay *display)
+_eglReleaseDisplayResources(const _EGLDriver *drv, _EGLDisplay *display)
{
_EGLResource *list;
void *PlatformDisplay; /**< A pointer to the platform display */
_EGLDevice *Device; /**< Device backing the display */
- _EGLDriver *Driver; /**< Matched driver of the display */
+ const _EGLDriver *Driver; /**< Matched driver of the display */
EGLBoolean Initialized; /**< True if the display is initialized */
/* options that affect how the driver initializes the display */
extern void
-_eglReleaseDisplayResources(_EGLDriver *drv, _EGLDisplay *disp);
+_eglReleaseDisplayResources(const _EGLDriver *drv, _EGLDisplay *disp);
extern void
#include "util/debug.h"
-extern _EGLDriver _eglDriver;
+extern const _EGLDriver _eglDriver;
/**
* Initialize the display using the driver's function.
struct _egl_driver
{
/* driver funcs */
- EGLBoolean (*Initialize)(_EGLDriver *, _EGLDisplay *disp);
- EGLBoolean (*Terminate)(_EGLDriver *, _EGLDisplay *disp);
+ EGLBoolean (*Initialize)(const _EGLDriver *, _EGLDisplay *disp);
+ EGLBoolean (*Terminate)(const _EGLDriver *, _EGLDisplay *disp);
const char *(*QueryDriverName)(_EGLDisplay *disp);
char *(*QueryDriverConfig)(_EGLDisplay *disp);
/* context funcs */
- _EGLContext *(*CreateContext)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLContext *(*CreateContext)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *config, _EGLContext *share_list,
const EGLint *attrib_list);
- EGLBoolean (*DestroyContext)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*DestroyContext)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx);
/* this is the only function (other than Initialize) that may be called
* with an uninitialized display
*/
- EGLBoolean (*MakeCurrent)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*MakeCurrent)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *draw, _EGLSurface *read,
_EGLContext *ctx);
/* surface funcs */
- _EGLSurface *(*CreateWindowSurface)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *(*CreateWindowSurface)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *config, void *native_window,
const EGLint *attrib_list);
- _EGLSurface *(*CreatePixmapSurface)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *(*CreatePixmapSurface)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *config, void *native_pixmap,
const EGLint *attrib_list);
- _EGLSurface *(*CreatePbufferSurface)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *(*CreatePbufferSurface)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *config,
const EGLint *attrib_list);
- EGLBoolean (*DestroySurface)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*DestroySurface)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface);
- EGLBoolean (*QuerySurface)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*QuerySurface)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface, EGLint attribute,
EGLint *value);
- EGLBoolean (*BindTexImage)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*BindTexImage)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface, EGLint buffer);
- EGLBoolean (*ReleaseTexImage)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*ReleaseTexImage)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface, EGLint buffer);
- EGLBoolean (*SwapInterval)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*SwapInterval)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint interval);
- EGLBoolean (*SwapBuffers)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*SwapBuffers)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *draw);
- EGLBoolean (*CopyBuffers)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*CopyBuffers)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface, void *native_pixmap_target);
- EGLBoolean (*SetDamageRegion)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*SetDamageRegion)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface, EGLint *rects, EGLint n_rects);
/* misc functions */
- EGLBoolean (*WaitClient)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*WaitClient)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx);
- EGLBoolean (*WaitNative)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*WaitNative)(const _EGLDriver *drv, _EGLDisplay *disp,
EGLint engine);
/* this function may be called from multiple threads at the same time */
- _EGLProc (*GetProcAddress)(_EGLDriver *drv, const char *procname);
+ _EGLProc (*GetProcAddress)(const _EGLDriver *drv, const char *procname);
- _EGLImage *(*CreateImageKHR)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLImage *(*CreateImageKHR)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx, EGLenum target,
EGLClientBuffer buffer,
const EGLint *attr_list);
- EGLBoolean (*DestroyImageKHR)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*DestroyImageKHR)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLImage *image);
- _EGLSync *(*CreateSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp, EGLenum type,
+ _EGLSync *(*CreateSyncKHR)(const _EGLDriver *drv, _EGLDisplay *disp, EGLenum type,
const EGLAttrib *attrib_list);
- EGLBoolean (*DestroySyncKHR)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*DestroySyncKHR)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSync *sync);
- EGLint (*ClientWaitSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLint (*ClientWaitSyncKHR)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSync *sync, EGLint flags, EGLTime timeout);
- EGLint (*WaitSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync);
- EGLBoolean (*SignalSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLint (*WaitSyncKHR)(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync);
+ EGLBoolean (*SignalSyncKHR)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSync *sync, EGLenum mode);
- EGLint (*DupNativeFenceFDANDROID)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLint (*DupNativeFenceFDANDROID)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSync *sync);
- EGLBoolean (*SwapBuffersRegionNOK)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*SwapBuffersRegionNOK)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint numRects,
const EGLint *rects);
- _EGLImage *(*CreateDRMImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLImage *(*CreateDRMImageMESA)(const _EGLDriver *drv, _EGLDisplay *disp,
const EGLint *attr_list);
- EGLBoolean (*ExportDRMImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*ExportDRMImageMESA)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLImage *img, EGLint *name,
EGLint *handle, EGLint *stride);
- EGLBoolean (*BindWaylandDisplayWL)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*BindWaylandDisplayWL)(const _EGLDriver *drv, _EGLDisplay *disp,
struct wl_display *display);
- EGLBoolean (*UnbindWaylandDisplayWL)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*UnbindWaylandDisplayWL)(const _EGLDriver *drv, _EGLDisplay *disp,
struct wl_display *display);
- EGLBoolean (*QueryWaylandBufferWL)(_EGLDriver *drv, _EGLDisplay *displ,
+ EGLBoolean (*QueryWaylandBufferWL)(const _EGLDriver *drv, _EGLDisplay *displ,
struct wl_resource *buffer,
EGLint attribute, EGLint *value);
- struct wl_buffer *(*CreateWaylandBufferFromImageWL)(_EGLDriver *drv,
+ struct wl_buffer *(*CreateWaylandBufferFromImageWL)(const _EGLDriver *drv,
_EGLDisplay *disp,
_EGLImage *img);
- EGLBoolean (*SwapBuffersWithDamageEXT)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*SwapBuffersWithDamageEXT)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface,
const EGLint *rects, EGLint n_rects);
- EGLBoolean (*PostSubBufferNV)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*PostSubBufferNV)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface, EGLint x, EGLint y,
EGLint width, EGLint height);
- EGLint (*QueryBufferAge)(_EGLDriver *drv,
+ EGLint (*QueryBufferAge)(const _EGLDriver *drv,
_EGLDisplay *disp, _EGLSurface *surface);
EGLBoolean (*GetSyncValuesCHROMIUM)(_EGLDisplay *disp, _EGLSurface *surface,
EGLuint64KHR *ust, EGLuint64KHR *msc,
EGLuint64KHR *sbc);
- EGLBoolean (*ExportDMABUFImageQueryMESA)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*ExportDMABUFImageQueryMESA)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLImage *img, EGLint *fourcc,
EGLint *nplanes,
EGLuint64KHR *modifiers);
- EGLBoolean (*ExportDMABUFImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*ExportDMABUFImageMESA)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLImage *img, EGLint *fds,
EGLint *strides, EGLint *offsets);
struct mesa_glinterop_export_in *in,
struct mesa_glinterop_export_out *out);
- EGLBoolean (*QueryDmaBufFormatsEXT)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*QueryDmaBufFormatsEXT)(const _EGLDriver *drv, _EGLDisplay *disp,
EGLint max_formats, EGLint *formats,
EGLint *num_formats);
- EGLBoolean (*QueryDmaBufModifiersEXT) (_EGLDriver *drv, _EGLDisplay *disp,
+ EGLBoolean (*QueryDmaBufModifiersEXT) (const _EGLDriver *drv, _EGLDisplay *disp,
EGLint format, EGLint max_modifiers,
EGLuint64KHR *modifiers,
EGLBoolean *external_only,
EGLint *num_modifiers);
- void (*SetBlobCacheFuncsANDROID) (_EGLDriver *drv, _EGLDisplay *disp,
+ void (*SetBlobCacheFuncsANDROID) (const _EGLDriver *drv, _EGLDisplay *disp,
EGLSetBlobFuncANDROID set,
EGLGetBlobFuncANDROID get);
};
EGLBoolean
-_eglQuerySurface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface,
+_eglQuerySurface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface,
EGLint attribute, EGLint *value)
{
switch (attribute) {
* Default fallback routine - drivers might override this.
*/
EGLBoolean
-_eglSurfaceAttrib(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface,
+_eglSurfaceAttrib(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface,
EGLint attribute, EGLint value)
{
EGLint confval;
EGLBoolean
-_eglBindTexImage(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface,
+_eglBindTexImage(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface,
EGLint buffer)
{
EGLint texture_type = EGL_PBUFFER_BIT;
}
EGLBoolean
-_eglReleaseTexImage(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+_eglReleaseTexImage(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint buffer)
{
/* Just do basic error checking and return success/fail.
EGLBoolean
-_eglSwapInterval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+_eglSwapInterval(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint interval)
{
return EGL_TRUE;
extern EGLBoolean
-_eglQuerySurface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, EGLint attribute, EGLint *value);
+_eglQuerySurface(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, EGLint attribute, EGLint *value);
extern EGLBoolean
-_eglSurfaceAttrib(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, EGLint attribute, EGLint value);
+_eglSurfaceAttrib(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, EGLint attribute, EGLint value);
extern EGLBoolean
-_eglBindTexImage(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, EGLint buffer);
+_eglBindTexImage(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, EGLint buffer);
extern EGLBoolean
-_eglReleaseTexImage(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, EGLint buffer);
+_eglReleaseTexImage(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, EGLint buffer);
extern EGLBoolean
-_eglSwapInterval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, EGLint interval);
+_eglSwapInterval(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, EGLint interval);
extern EGLBoolean
_eglSurfaceHasMutableRenderBuffer(_EGLSurface *surf);
EGLBoolean
-_eglGetSyncAttrib(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync,
+_eglGetSyncAttrib(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync,
EGLint attribute, EGLAttrib *value)
{
switch (attribute) {
extern EGLBoolean
-_eglGetSyncAttrib(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync,
+_eglGetSyncAttrib(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync,
EGLint attribute, EGLAttrib *value);