From 0c1c261c2df8cdbe381e1e9b83dc0b46d936f538 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 28 Mar 2011 22:33:38 +0800 Subject: gralloc: glFlush() should suffice for page flipping --- src/gralloc/Android.mk | 2 +- src/gralloc/gralloc_mod.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gralloc/Android.mk b/src/gralloc/Android.mk index e50060ee656..d440a99308b 100644 --- a/src/gralloc/Android.mk +++ b/src/gralloc/Android.mk @@ -16,7 +16,7 @@ LOCAL_SHARED_LIBRARIES := \ libdrm \ liblog \ libcutils \ - libEGL + libGLESv1_CM ifeq ($(strip $(MESA_BUILD_INTEL)),true) LOCAL_SRC_FILES += gralloc_gem_intel.c diff --git a/src/gralloc/gralloc_mod.c b/src/gralloc/gralloc_mod.c index 1296d2af042..bc0786eb3ea 100644 --- a/src/gralloc/gralloc_mod.c +++ b/src/gralloc/gralloc_mod.c @@ -222,11 +222,17 @@ drm_mod_post_fb0(struct framebuffer_device_t *fb, buffer_handle_t handle) return drm_kms_post(drm, bo); } -#include +#include static int drm_mod_composition_complete_fb0(struct framebuffer_device_t *fb) { - eglWaitClient(); + struct drm_module_t *drm = (struct drm_module_t *) fb->common.module; + + if (drm->mode_page_flip) + glFlush(); + else + glFinish(); + return 0; } -- cgit v1.2.3