summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-05-16 13:54:11 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-05-16 13:54:11 +0200
commitc55ca97cdea4e124d0655292bc2ac4ea8c675468 (patch)
treea1301856a10c54532aa5b869d8e912f5ba40ba9c
parente2280a8a1e4d215db7f06e0945e5123ada439c3f (diff)
gbm_bo_create_from_egl_image: Drop format parameter
-rw-r--r--src/gbm/backends/dri/gbm_dri.c21
-rw-r--r--src/gbm/backends/gallium_drm/gbm_gallium_drm.c5
-rw-r--r--src/gbm/main/api.c5
-rw-r--r--src/gbm/main/gbm.h3
-rw-r--r--src/gbm/main/internal.h3
5 files changed, 9 insertions, 28 deletions
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index 838a73fad8..9173cf5dd1 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -194,15 +194,16 @@ gbm_dri_bo_destroy(struct gbm_bo *_bo)
static struct gbm_bo *
gbm_dri_bo_create_from_egl_image(struct gbm_device *gbm,
void *egl_dpy, void *egl_img,
- uint32_t width, uint32_t height,
- enum gbm_bo_format format)
+ uint32_t width, uint32_t height)
{
struct gbm_dri_device *dri = gbm_dri_device(gbm);
struct gbm_dri_bo *bo;
- int dri_format;
(void) egl_dpy;
+ if (dri->lookup_image == NULL)
+ return NULL;
+
bo = calloc(1, sizeof *bo);
if (bo == NULL)
return NULL;
@@ -211,20 +212,6 @@ gbm_dri_bo_create_from_egl_image(struct gbm_device *gbm,
bo->base.base.width = width;
bo->base.base.height = height;
- switch (format) {
- case GBM_BO_FORMAT_XRGB8888:
- dri_format = __DRI_IMAGE_FORMAT_XRGB8888;
- break;
- case GBM_BO_FORMAT_ARGB8888:
- dri_format = __DRI_IMAGE_FORMAT_ARGB8888;
- break;
- default:
- return NULL;
- }
-
- if (dri->lookup_image == NULL)
- return NULL;
-
__DRIimage *tmp = dri->lookup_image(dri->screen, egl_img, dri->lookup_user_data);
bo->image = dri->image->dupImage(tmp, bo);
diff --git a/src/gbm/backends/gallium_drm/gbm_gallium_drm.c b/src/gbm/backends/gallium_drm/gbm_gallium_drm.c
index d9ecbd9d2c..491eca171e 100644
--- a/src/gbm/backends/gallium_drm/gbm_gallium_drm.c
+++ b/src/gbm/backends/gallium_drm/gbm_gallium_drm.c
@@ -163,15 +163,12 @@ gbm_gallium_drm_bo_destroy(struct gbm_bo *_bo)
static struct gbm_bo *
gbm_gallium_drm_bo_create_from_egl_image(struct gbm_device *gbm,
void *egl_dpy, void *egl_image,
- uint32_t width, uint32_t height,
- enum gbm_bo_format format)
+ uint32_t width, uint32_t height)
{
struct gbm_gallium_drm_device *gdrm = gbm_gallium_drm_device(gbm);
struct gbm_gallium_drm_bo *bo;
struct winsys_handle whandle;
- (void) format;
-
if (!gdrm->lookup_egl_image)
return NULL;
diff --git a/src/gbm/main/api.c b/src/gbm/main/api.c
index 24e8c5615c..82f8f054e1 100644
--- a/src/gbm/main/api.c
+++ b/src/gbm/main/api.c
@@ -91,12 +91,11 @@ gbm_bo_create(struct gbm_device *gbm,
GBM_EXPORT struct gbm_bo *
gbm_bo_create_from_egl_image(struct gbm_device *gbm,
void *egl_dpy, void *egl_image,
- uint32_t width, uint32_t height,
- enum gbm_bo_format format)
+ uint32_t width, uint32_t height)
{
if (width == 0 || height == 0)
return NULL;
return gbm->bo_create_from_egl_image(gbm, egl_dpy, egl_image,
- width, height, format);
+ width, height);
}
diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h
index 9200ca5ae5..6de71442d0 100644
--- a/src/gbm/main/gbm.h
+++ b/src/gbm/main/gbm.h
@@ -50,8 +50,7 @@ gbm_bo_create(struct gbm_device *gbm,
struct gbm_bo *
gbm_bo_create_from_egl_image(struct gbm_device *gbm,
void *egl_dpy, void *egl_img,
- uint32_t width, uint32_t height,
- enum gbm_bo_format format);
+ uint32_t width, uint32_t height);
uint32_t
gbm_bo_get_width(struct gbm_bo *bo);
diff --git a/src/gbm/main/internal.h b/src/gbm/main/internal.h
index 6f0d4f1f16..146a98a109 100644
--- a/src/gbm/main/internal.h
+++ b/src/gbm/main/internal.h
@@ -26,8 +26,7 @@ struct gbm_device {
struct gbm_bo *(*bo_create_from_egl_image)(struct gbm_device *gbm,
void *egl_dpy, void *egl_img,
- uint32_t width, uint32_t height,
- enum gbm_bo_format format);
+ uint32_t width, uint32_t height);
#if 0
int (*bo_map)(struct gbm_bo *bo, void **out);