summaryrefslogtreecommitdiffstats
path: root/modules/gralloc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gralloc')
-rw-r--r--modules/gralloc/Android.mk4
-rw-r--r--modules/gralloc/framebuffer.cpp5
2 files changed, 9 insertions, 0 deletions
diff --git a/modules/gralloc/Android.mk b/modules/gralloc/Android.mk
index 8946fac..ac09e5a 100644
--- a/modules/gralloc/Android.mk
+++ b/modules/gralloc/Android.mk
@@ -29,4 +29,8 @@ LOCAL_SRC_FILES := \
LOCAL_MODULE := gralloc.default
LOCAL_CFLAGS:= -DLOG_TAG=\"gralloc\"
+ifeq ($(BOARD_NO_PAGE_FLIPPING),true)
+LOCAL_CFLAGS += -DNO_PAGE_FLIPPING
+endif
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/modules/gralloc/framebuffer.cpp b/modules/gralloc/framebuffer.cpp
index 0195103..a487b5d 100644
--- a/modules/gralloc/framebuffer.cpp
+++ b/modules/gralloc/framebuffer.cpp
@@ -43,7 +43,12 @@
/*****************************************************************************/
// numbers of buffers for page flipping
+#if defined(NO_PAGE_FLIPPING)
+// page-flipping is buggy on some devices
+#define NUM_BUFFERS 1
+#else
#define NUM_BUFFERS 2
+#endif
enum {