summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/Android.mk7
-rw-r--r--src/egl/drivers/dri2/egl_dri2.h9
-rw-r--r--src/egl/drivers/dri2/platform_android.c15
3 files changed, 3 insertions, 28 deletions
diff --git a/src/egl/Android.mk b/src/egl/Android.mk
index 0227ad82c67..56d8859dd5f 100644
--- a/src/egl/Android.mk
+++ b/src/egl/Android.mk
@@ -55,11 +55,8 @@ LOCAL_SHARED_LIBRARIES := \
libhardware \
liblog \
libcutils \
- libgralloc_drm
-
-ifeq ($(shell echo "$(MESA_ANDROID_VERSION) >= 4.2" | bc),1)
-LOCAL_SHARED_LIBRARIES += libsync
-endif
+ libgralloc_drm \
+ libsync
ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
# require i915_dri and/or i965_dri
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index 230c0663d3c..f16663712d3 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -56,14 +56,7 @@
#ifdef HAVE_ANDROID_PLATFORM
#define LOG_TAG "EGL-DRI2"
-#if ANDROID_VERSION >= 0x0400
-# include <system/window.h>
-#else
-# define android_native_buffer_t ANativeWindowBuffer
-# include <ui/egl/android_natives.h>
-# include <ui/android_native_buffer.h>
-#endif
-
+#include <system/window.h>
#include <hardware/gralloc.h>
#include <gralloc_drm_handle.h>
#include <cutils/log.h>
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 667e08b3451..6cbe119b024 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -32,10 +32,7 @@
#include <fcntl.h>
#include <xf86drm.h>
#include <stdbool.h>
-
-#if ANDROID_VERSION >= 0x402
#include <sync/sync.h>
-#endif
#include "loader.h"
#include "egl_dri2.h"
@@ -160,7 +157,6 @@ get_native_buffer_name(struct ANativeWindowBuffer *buf)
static EGLBoolean
droid_window_dequeue_buffer(struct dri2_egl_surface *dri2_surf)
{
-#if ANDROID_VERSION >= 0x0402
int fence_fd;
if (dri2_surf->window->dequeueBuffer(dri2_surf->window, &dri2_surf->buffer,
@@ -195,13 +191,6 @@ droid_window_dequeue_buffer(struct dri2_egl_surface *dri2_surf)
}
dri2_surf->buffer->common.incRef(&dri2_surf->buffer->common);
-#else
- if (dri2_surf->window->dequeueBuffer(dri2_surf->window, &dri2_surf->buffer))
- return EGL_FALSE;
-
- dri2_surf->buffer->common.incRef(&dri2_surf->buffer->common);
- dri2_surf->window->lockBuffer(dri2_surf->window, dri2_surf->buffer);
-#endif
/* Record all the buffers created by ANativeWindow and update back buffer
* for updating buffer's age in swap_buffers.
@@ -244,7 +233,6 @@ droid_window_enqueue_buffer(_EGLDisplay *disp, struct dri2_egl_surface *dri2_sur
*/
mtx_unlock(&disp->Mutex);
-#if ANDROID_VERSION >= 0x0402
/* Queue the buffer without a sync fence. This informs the ANativeWindow
* that it may access the buffer immediately.
*
@@ -260,9 +248,6 @@ droid_window_enqueue_buffer(_EGLDisplay *disp, struct dri2_egl_surface *dri2_sur
int fence_fd = -1;
dri2_surf->window->queueBuffer(dri2_surf->window, dri2_surf->buffer,
fence_fd);
-#else
- dri2_surf->window->queueBuffer(dri2_surf->window, dri2_surf->buffer);
-#endif
dri2_surf->buffer->common.decRef(&dri2_surf->buffer->common);
dri2_surf->buffer = NULL;