[Mesa-dev] [PATCH v3 21/22] egl/android: apply dri2_egl_surface_get_image_front() helper
Gwan-gyeong Mun
elongbug at gmail.com
Wed Oct 4 06:50:33 UTC 2017
Signed-off-by: Mun Gwan-gyeong <elongbug at gmail.com>
---
src/egl/drivers/dri2/platform_android.c | 35 +--------------------------------
1 file changed, 1 insertion(+), 34 deletions(-)
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index a8e33fb3e2..ba7ab4cd98 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -388,39 +388,6 @@ update_buffers(struct dri2_egl_surface *dri2_surf)
return 0;
}
-static int
-get_front_bo(struct dri2_egl_surface *dri2_surf, unsigned int format)
-{
- struct dri2_egl_display *dri2_dpy =
- dri2_egl_display(dri2_surf->base.Resource.Display);
-
- if (dri2_surf->dri_image_front)
- return 0;
-
- if (dri2_surf->base.Type == EGL_WINDOW_BIT) {
- /* According current EGL spec, front buffer rendering
- * for window surface is not supported now.
- * and mesa doesn't have the implementation of this case.
- * Add warning message, but not treat it as error.
- */
- _eglLog(_EGL_DEBUG, "DRI driver requested unsupported front buffer for window surface");
- } else if (dri2_surf->base.Type == EGL_PBUFFER_BIT) {
- dri2_surf->dri_image_front =
- dri2_dpy->image->createImage(dri2_dpy->dri_screen,
- dri2_surf->base.Width,
- dri2_surf->base.Height,
- format,
- 0,
- dri2_surf);
- if (!dri2_surf->dri_image_front) {
- _eglLog(_EGL_WARNING, "dri2_image_front allocation failed");
- return -1;
- }
- }
-
- return 0;
-}
-
static int
get_back_bo(struct dri2_egl_surface *dri2_surf)
{
@@ -512,7 +479,7 @@ droid_image_get_buffers(__DRIdrawable *driDrawable,
return 0;
if (buffer_mask & __DRI_IMAGE_BUFFER_FRONT) {
- if (get_front_bo(dri2_surf, format) < 0)
+ if (dri2_egl_surface_get_image_front(dri2_surf, format) < 0)
return 0;
if (dri2_surf->dri_image_front) {
--
2.14.2
More information about the mesa-dev
mailing list