summaryrefslogtreecommitdiffstats
path: root/modules/gralloc
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-10-14 18:04:30 -0700
committerJean-Baptiste Queru <jbq@google.com>2010-10-14 19:05:09 -0700
commit118b5d7961a4abc29c8bd592956007f40ad4fc6d (patch)
treea20a8e591ef0fe00eb32b2fc137ba4e2f274dd8c /modules/gralloc
parent455e83b705cf4ab830b79585f83176b90daed895 (diff)
downloadhardware_libhardware-118b5d7961a4abc29c8bd592956007f40ad4fc6d.zip
hardware_libhardware-118b5d7961a4abc29c8bd592956007f40ad4fc6d.tar.gz
hardware_libhardware-118b5d7961a4abc29c8bd592956007f40ad4fc6d.tar.bz2
Allow disabling page-flipping.
Some devices have low-level bugs in their page-flip. Disabling it at this level gives us more flexibility than trying to control it elsewhere. Bug: 3097357 Change-Id: Icc6ae172264e453bec0680e74a497a2b24299c4a
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 {