[Mesa-dev] [PATCH v3 16/22] egl/android: apply dri2_egl_surface_free_outdated_buffers_and_update_size() helper

Gwan-gyeong Mun elongbug at gmail.com
Wed Oct 4 06:50:28 UTC 2017


Signed-off-by: Mun Gwan-gyeong <elongbug at gmail.com>
---
 src/egl/drivers/dri2/platform_android.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index e390365b8b..0acbb38bd8 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -414,12 +414,9 @@ update_buffers(struct dri2_egl_surface *dri2_surf)
    }
 
    /* free outdated buffers and update the surface size */
-   if (dri2_surf->base.Width != dri2_surf->buffer->width ||
-       dri2_surf->base.Height != dri2_surf->buffer->height) {
-      dri2_egl_surface_free_local_buffers(dri2_surf);
-      dri2_surf->base.Width = dri2_surf->buffer->width;
-      dri2_surf->base.Height = dri2_surf->buffer->height;
-   }
+   dri2_egl_surface_free_outdated_buffers_and_update_size(dri2_surf,
+                                                          dri2_surf->buffer->width,
+                                                          dri2_surf->buffer->height);
 
    return 0;
 }
-- 
2.14.2



More information about the mesa-dev mailing list