OSDN Git Service

Allow disabling page-flipping.
authorJean-Baptiste Queru <jbq@google.com>
Fri, 15 Oct 2010 01:04:30 +0000 (18:04 -0700)
committerJean-Baptiste Queru <jbq@google.com>
Fri, 15 Oct 2010 02:05:09 +0000 (19:05 -0700)
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

modules/gralloc/Android.mk
modules/gralloc/framebuffer.cpp

index 8946fac..ac09e5a 100644 (file)
@@ -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)
index 0195103..a487b5d 100644 (file)
 /*****************************************************************************/
 
 // 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 {