}
static EGLBoolean
-dri2_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+dri2_swap_buffers(_EGLDisplay *disp, _EGLSurface *surf)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
__DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf);
if (ctx && surf)
dri2_surf_update_fence_fd(ctx, disp, surf);
- ret = dri2_dpy->vtbl->swap_buffers(drv, disp, surf);
+ ret = dri2_dpy->vtbl->swap_buffers(disp, surf);
/* SwapBuffers marks the end of the frame; reset the damage region for
* use again next time.
}
static EGLBoolean
-dri2_swap_buffers_with_damage(const _EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surf,
+dri2_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *surf,
const EGLint *rects, EGLint n_rects)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
if (ctx && surf)
dri2_surf_update_fence_fd(ctx, disp, surf);
if (dri2_dpy->vtbl->swap_buffers_with_damage)
- ret = dri2_dpy->vtbl->swap_buffers_with_damage(drv, disp, surf,
+ ret = dri2_dpy->vtbl->swap_buffers_with_damage(disp, surf,
rects, n_rects);
else
- ret = dri2_dpy->vtbl->swap_buffers(drv, disp, surf);
+ ret = dri2_dpy->vtbl->swap_buffers(disp, surf);
/* SwapBuffers marks the end of the frame; reset the damage region for
* use again next time.
}
static EGLBoolean
-dri2_swap_buffers_region(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+dri2_swap_buffers_region(_EGLDisplay *disp, _EGLSurface *surf,
EGLint numRects, const EGLint *rects)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
if (!dri2_dpy->vtbl->swap_buffers_region)
return EGL_FALSE;
- ret = dri2_dpy->vtbl->swap_buffers_region(drv, disp, surf, numRects, rects);
+ ret = dri2_dpy->vtbl->swap_buffers_region(disp, surf, numRects, rects);
/* SwapBuffers marks the end of the frame; reset the damage region for
* use again next time.
const EGLint *attr_list);
/* mandatory */
- EGLBoolean (*swap_buffers)(const _EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surf);
+ EGLBoolean (*swap_buffers)(_EGLDisplay *disp, _EGLSurface *surf);
/* optional - falls back to .swap_buffers */
- EGLBoolean (*swap_buffers_with_damage)(const _EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surface,
+ EGLBoolean (*swap_buffers_with_damage)(_EGLDisplay *disp, _EGLSurface *surface,
const EGLint *rects, EGLint n_rects);
/* optional */
- EGLBoolean (*swap_buffers_region)(const _EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surf, EGLint numRects,
- const EGLint *rects);
+ EGLBoolean (*swap_buffers_region)(_EGLDisplay *disp, _EGLSurface *surf,
+ EGLint numRects, const EGLint *rects);
/* optional */
EGLBoolean (*post_sub_buffer)(const _EGLDriver *drv, _EGLDisplay *disp,
}
static EGLBoolean
-droid_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+droid_swap_buffers(_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_drm_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+dri2_drm_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
* Called via eglSwapBuffers(), drv->SwapBuffers().
*/
static EGLBoolean
-dri2_wl_swap_buffers_with_damage(const _EGLDriver *drv,
- _EGLDisplay *disp,
+dri2_wl_swap_buffers_with_damage(_EGLDisplay *disp,
_EGLSurface *draw,
const EGLint *rects,
EGLint n_rects)
}
static EGLBoolean
-dri2_wl_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+dri2_wl_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
{
- return dri2_wl_swap_buffers_with_damage(drv, disp, draw, NULL, 0);
+ return dri2_wl_swap_buffers_with_damage(disp, draw, NULL, 0);
}
static struct wl_buffer *
}
static EGLBoolean
-dri2_wl_swrast_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+dri2_wl_swrast_swap_buffers(_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_copy_region(const _EGLDriver *drv, _EGLDisplay *disp,
+dri2_copy_region(_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(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
+dri2_x11_swap_buffers_msc(_EGLDisplay *disp, _EGLSurface *draw,
int64_t msc, int64_t divisor, int64_t remainder)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
int64_t swap_count = -1;
if (draw->SwapBehavior == EGL_BUFFER_PRESERVED || !dri2_dpy->swap_available) {
- swap_count = dri2_copy_region(drv, disp, draw, dri2_surf->region) ? 0 : -1;
+ swap_count = dri2_copy_region(disp, draw, dri2_surf->region) ? 0 : -1;
} else {
dri2_flush_drawable_for_swapbuffers(disp, draw);
}
static EGLBoolean
-dri2_x11_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+dri2_x11_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
return EGL_TRUE;
}
- if (dri2_x11_swap_buffers_msc(drv, disp, draw, 0, 0, 0) == -1) {
+ if (dri2_x11_swap_buffers_msc(disp, draw, 0, 0, 0) == -1) {
/* Swap failed with a window drawable. */
return _eglError(EGL_BAD_NATIVE_WINDOW, __func__);
}
}
static EGLBoolean
-dri2_x11_swap_buffers_region(const _EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *draw,
+dri2_x11_swap_buffers_region(_EGLDisplay *disp, _EGLSurface *draw,
EGLint numRects, const EGLint *rects)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
xcb_rectangle_t rectangles[16];
if (numRects > (int)ARRAY_SIZE(rectangles))
- return dri2_copy_region(drv, disp, draw, dri2_surf->region);
+ return dri2_copy_region(disp, draw, dri2_surf->region);
for (int i = 0; i < numRects; i++) {
rectangles[i].x = rects[i * 4];
region = xcb_generate_id(dri2_dpy->conn);
xcb_xfixes_create_region(dri2_dpy->conn, region, numRects, rectangles);
- ret = dri2_copy_region(drv, disp, draw, region);
+ ret = dri2_copy_region(disp, draw, region);
xcb_xfixes_destroy_region(dri2_dpy->conn, region);
return ret;
if (x < 0 || y < 0 || width < 0 || height < 0)
_eglError(EGL_BAD_PARAMETER, "eglPostSubBufferNV");
- return dri2_x11_swap_buffers_region(drv, disp, draw, 1, rect);
+ return dri2_x11_swap_buffers_region(disp, draw, 1, rect);
}
static EGLBoolean
};
static EGLBoolean
-dri3_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
+dri3_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
{
struct dri3_egl_surface *dri3_surf = dri3_egl_surface(draw);
extern "C"
EGLBoolean
-haiku_swap_buffers(const _EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+haiku_swap_buffers(_EGLDisplay *disp, _EGLSurface *surf)
{
struct haiku_egl_surface* surface = haiku_egl_surface(surf);
if (surf->Lost)
RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_FALSE);
- ret = drv->SwapBuffers(drv, disp, surf);
+ ret = drv->SwapBuffers(disp, surf);
/* EGL_KHR_partial_update
* Frame boundary successfully reached,
if ((n_rects > 0 && rects == NULL) || n_rects < 0)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
- ret = drv->SwapBuffersWithDamageEXT(drv, disp, surf, rects, n_rects);
+ ret = drv->SwapBuffersWithDamageEXT(disp, surf, rects, n_rects);
/* EGL_KHR_partial_update
* Frame boundary successfully reached,
surf != ctx->DrawSurface)
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
- ret = drv->SwapBuffersRegionNOK(drv, disp, surf, numRects, rects);
+ ret = drv->SwapBuffersRegionNOK(disp, surf, numRects, rects);
RETURN_EGL_EVAL(disp, ret);
}
EGLint buffer);
EGLBoolean (*SwapInterval)(_EGLDisplay *disp, _EGLSurface *surf,
EGLint interval);
- EGLBoolean (*SwapBuffers)(const _EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *draw);
+ EGLBoolean (*SwapBuffers)(_EGLDisplay *disp, _EGLSurface *draw);
EGLBoolean (*CopyBuffers)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface, void *native_pixmap_target);
EGLBoolean (*SetDamageRegion)(const _EGLDriver *drv, _EGLDisplay *disp,
EGLint (*DupNativeFenceFDANDROID)(const _EGLDriver *drv, _EGLDisplay *disp,
_EGLSync *sync);
- EGLBoolean (*SwapBuffersRegionNOK)(const _EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surf, EGLint numRects,
- const EGLint *rects);
+ EGLBoolean (*SwapBuffersRegionNOK)(_EGLDisplay *disp, _EGLSurface *surf,
+ EGLint numRects, const EGLint *rects);
_EGLImage *(*CreateDRMImageMESA)(const _EGLDriver *drv, _EGLDisplay *disp,
const EGLint *attr_list);
_EGLDisplay *disp,
_EGLImage *img);
- EGLBoolean (*SwapBuffersWithDamageEXT)(const _EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surface,
+ EGLBoolean (*SwapBuffersWithDamageEXT)(_EGLDisplay *disp, _EGLSurface *surface,
const EGLint *rects, EGLint n_rects);
EGLBoolean (*PostSubBufferNV)(const _EGLDriver *drv, _EGLDisplay *disp,