/contrib/sdk/sources/Mesa/src/egl/drivers/dri2/egl_dri2.c |
---|
1255,7 → 1255,7 |
EGLint err; |
int32_t plane; |
if (!wayland_buffer_is_drm(&buffer->buffer)) |
if (!wayland_buffer_is_drm(dri2_dpy->wl_server_drm, &buffer->buffer)) |
return NULL; |
err = _eglParseImageAttribList(&attrs, disp, attr_list); |
1663,9 → 1663,10 |
EGLint attribute, EGLint *value) |
{ |
struct wl_drm_buffer *buffer = (struct wl_drm_buffer *) _buffer; |
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); |
const struct wl_drm_components_descriptor *format; |
if (!wayland_buffer_is_drm(&buffer->buffer)) |
if (!wayland_buffer_is_drm(dri2_dpy->wl_server_drm, &buffer->buffer)) |
return EGL_FALSE; |
format = buffer->driver_format; |
/contrib/sdk/sources/Mesa/src/egl/drivers/dri2/platform_drm.c |
---|
46,9 → 46,9 |
void* load_library(const char *name); |
void *get_proc_address(void *module, char *proc_name); |
static int (*blit_bitmap_from_handle)(bitmap_t *bitmap, uint32_t handle); |
static void (*blit_set_bo_handle)(bitmap_t *bitmap, int handle); |
static int (*blit_blit_tex)(bitmap_t *bitmap, int scale, int vsync, int dst_x, int dst_y, |
int (*blit_bitmap_from_handle)(bitmap_t *bitmap, uint32_t handle); |
void (*blit_set_bo_handle)(bitmap_t *bitmap, int handle); |
int (*blit_blit_tex)(bitmap_t *bitmap, int scale, int vsync, int dst_x, int dst_y, |
int w, int h, int src_x, int src_y); |
static struct gbm_bo * |
267,15 → 267,11 |
struct dri2_egl_surface *dri2_surf = loaderPrivate; |
int i, j; |
// printf("dri2_get_buffers_with_format count %d\n", count); |
dri2_surf->buffer_count = 0; |
for (i = 0, j = 0; i < 2 * count; i += 2, j++) { |
assert(attachments[i] < __DRI_BUFFER_COUNT); |
assert(dri2_surf->buffer_count < 5); |
// printf("attachments %d\n",attachments[i]); |
switch (attachments[i]) { |
case __DRI_BUFFER_BACK_LEFT: |
if (get_back_bo(dri2_surf, &dri2_surf->buffers[j]) < 0) { |
/contrib/sdk/sources/Mesa/src/egl/wayland/wayland-drm/wayland-drm.c |
---|
45,6 → 45,7 |
uint32_t flags; |
struct wayland_drm_callbacks *callbacks; |
struct wl_buffer_interface buffer_interface; |
}; |
static void |
63,10 → 64,6 |
wl_resource_destroy(resource); |
} |
const static struct wl_buffer_interface drm_buffer_interface = { |
buffer_destroy |
}; |
static void |
create_buffer(struct wl_client *client, struct wl_resource *resource, |
uint32_t id, uint32_t name, int fd, |
107,7 → 104,7 |
buffer->buffer.resource.object.id = id; |
buffer->buffer.resource.object.interface = &wl_buffer_interface; |
buffer->buffer.resource.object.implementation = |
(void (**)(void)) &drm_buffer_interface; |
(void (**)(void)) &drm->buffer_interface; |
buffer->buffer.resource.data = buffer; |
buffer->buffer.resource.destroy = destroy_buffer; |
246,6 → 243,7 |
drm->callbacks = callbacks; |
drm->user_data = user_data; |
drm->flags = flags; |
drm->buffer_interface.destroy = buffer_destroy; |
wl_display_add_global(display, &wl_drm_interface, drm, bind_drm); |
263,10 → 261,10 |
} |
int |
wayland_buffer_is_drm(struct wl_buffer *buffer) |
wayland_buffer_is_drm(struct wl_drm *drm, struct wl_buffer *buffer) |
{ |
return buffer->resource.object.implementation == |
(void (**)(void)) &drm_buffer_interface; |
(void (**)(void)) &drm->buffer_interface; |
} |
uint32_t |
/contrib/sdk/sources/Mesa/src/egl/wayland/wayland-drm/wayland-drm.h |
---|
99,7 → 99,7 |
wayland_drm_uninit(struct wl_drm *drm); |
int |
wayland_buffer_is_drm(struct wl_buffer *buffer); |
wayland_buffer_is_drm(struct wl_drm *drm, struct wl_buffer *buffer); |
uint32_t |
wayland_drm_buffer_get_format(struct wl_buffer *buffer_base); |