diff options
Diffstat (limited to 'src/egl/drivers/android/droid_intel.c')
-rw-r--r-- | src/egl/drivers/android/droid_intel.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/egl/drivers/android/droid_intel.c b/src/egl/drivers/android/droid_intel.c index 32570b5ae0..3209ff9af7 100644 --- a/src/egl/drivers/android/droid_intel.c +++ b/src/egl/drivers/android/droid_intel.c @@ -472,7 +472,7 @@ intel_create_window_surface(struct droid_backend *backend, static struct droid_surface * intel_create_image_surface(struct droid_backend *backend, - NativePixmapType pix, int *depth) + NativePixmapType pix) { struct droid_surface_intel *isurf; int cpp; @@ -490,13 +490,6 @@ intel_create_image_surface(struct droid_backend *backend, return NULL; } - cpp = ui_bytes_per_pixel(pix->format); - if (cpp * 8 > DROID_MAX_IMAGE_DEPTH) { - LOGE("pixmap of depth %d is not supported", cpp * 8); - _eglError(EGL_BAD_NATIVE_PIXMAP, "eglCreateImage"); - return NULL; - } - isurf = calloc(1, sizeof(*isurf)); if (!isurf) { _eglError(EGL_BAD_ALLOC, "eglCreateWindowSurface"); @@ -508,9 +501,6 @@ intel_create_image_surface(struct droid_backend *backend, update_native_buffer((struct droid_surface *) isurf); - if (depth) - *depth = cpp * 8; - return (struct droid_surface *) isurf; } @@ -542,6 +532,16 @@ intel_swap_native_buffers(struct droid_backend *backend, } static int +intel_match_pixmap(struct droid_backend *backend, _EGLConfig *conf, + NativePixmapType pix) +{ + int val; + val = GET_CONFIG_ATTRIB(conf, EGL_NATIVE_VISUAL_TYPE); + /* match the visual type */ + return (pix->format == val); +} + +static int intel_initialize(struct droid_backend *backend, int *fd, int *screen_number) { struct droid_backend_intel *intel = lookup_backend(backend); @@ -638,5 +638,7 @@ droid_backend_create_intel(const char *dev) intel->base.destroy_surface = intel_destroy_surface; intel->base.swap_native_buffers = intel_swap_native_buffers; + intel->base.match_pixmap = intel_match_pixmap; + return &intel->base; } |