if (double_buffer)
return NULL;
- if (depth > 0 && depth != _eglGetConfigKey(&base, EGL_BUFFER_SIZE))
+ if (depth > 0 && depth != base.BufferSize)
return NULL;
- _eglSetConfigKey(&base, EGL_NATIVE_RENDERABLE, EGL_TRUE);
+ base.NativeRenderable = EGL_TRUE;
- _eglSetConfigKey(&base, EGL_SURFACE_TYPE, surface_type);
+ base.SurfaceType = surface_type;
if (surface_type & (EGL_PIXMAP_BIT | EGL_PBUFFER_BIT)) {
- _eglSetConfigKey(&base, EGL_BIND_TO_TEXTURE_RGB, bind_to_texture_rgb);
- if (_eglGetConfigKey(&base, EGL_ALPHA_SIZE) > 0)
- _eglSetConfigKey(&base,
- EGL_BIND_TO_TEXTURE_RGBA, bind_to_texture_rgba);
+ base.BindToTextureRGB = bind_to_texture_rgb;
+ if (base.AlphaSize > 0)
+ base.BindToTextureRGBA = bind_to_texture_rgba;
}
- _eglSetConfigKey(&base, EGL_RENDERABLE_TYPE, disp->ClientAPIsMask);
- _eglSetConfigKey(&base, EGL_CONFORMANT, disp->ClientAPIsMask);
+ base.RenderableType = disp->ClientAPIsMask;
+ base.Conformant = disp->ClientAPIsMask;
if (!_eglValidateConfig(&base, EGL_FALSE)) {
_eglLog(_EGL_DEBUG, "DRI2: failed to validate config %d", id);
struct dri2_egl_display *dri2_dpy =
dri2_egl_display(dri2_surf->base.Resource.Display);
xcb_rectangle_t rectangle;
- int i;
+ unsigned i;
dri2_surf->buffer_count = count;
dri2_surf->have_fake_front = 0;
static struct dri2_extension_match dri2_driver_extensions[] = {
{ __DRI_CORE, 1, offsetof(struct dri2_egl_display, core) },
{ __DRI_DRI2, 1, offsetof(struct dri2_egl_display, dri2) },
- { NULL }
+ { NULL, 0, 0 }
};
static struct dri2_extension_match dri2_core_extensions[] = {
{ __DRI2_FLUSH, 1, offsetof(struct dri2_egl_display, flush) },
{ __DRI_TEX_BUFFER, 2, offsetof(struct dri2_egl_display, tex_buffer) },
{ __DRI_IMAGE, 1, offsetof(struct dri2_egl_display, image) },
- { NULL }
+ { NULL, 0, 0 }
};
static EGLBoolean
if (type == EGL_PBUFFER_BIT) {
dri2_surf->drawable = xcb_generate_id(dri2_dpy->conn);
s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
- xcb_create_pixmap(dri2_dpy->conn,
- _eglGetConfigKey(conf, EGL_BUFFER_SIZE),
+ xcb_create_pixmap(dri2_dpy->conn, conf->BufferSize,
dri2_surf->drawable, s.data->root,
dri2_surf->base.Width, dri2_surf->base.Height);
} else {
xcb_rectangle_t rectangles[16];
int i;
- if (numRects > ARRAY_SIZE(rectangles))
+ if (numRects > (int)ARRAY_SIZE(rectangles))
return dri2_copy_region(drv, disp, draw, dri2_surf->region);
/* FIXME: Invert y here? */
return EGL_NO_IMAGE_KHR;
}
- if (!_eglInitImage(&dri2_img->base, disp, attr_list)) {
+ if (!_eglInitImage(&dri2_img->base, disp)) {
free(buffers_reply);
free(geometry_reply);
return EGL_NO_IMAGE_KHR;
return EGL_NO_IMAGE_KHR;
}
- if (!_eglInitImage(&dri2_img->base, disp, attr_list))
+ if (!_eglInitImage(&dri2_img->base, disp))
return EGL_NO_IMAGE_KHR;
dri2_img->dri_image =
return NULL;
}
- if (!_eglInitImage(&dri2_img->base, disp, attr_list)) {
+ if (!_eglInitImage(&dri2_img->base, disp)) {
free(dri2_img);
return NULL;
}
goto cleanup_img;
}
- if (!_eglInitImage(&dri2_img->base, disp, attr_list)) {
+ if (!_eglInitImage(&dri2_img->base, disp)) {
err = EGL_BAD_PARAMETER;
goto cleanup_img;
}