summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-04-23 20:00:16 -0700
committerMathias Agopian <mathias@google.com>2012-04-23 20:00:16 -0700
commit7f42a9c47c5a7f40cf02032d286d6bd62f28e650 (patch)
tree9593dd56ce8c8e7d913845f6d88c4787fd95966c /services
parent64a1e08b86d72cb375f9dfdf4eb6307f71817350 (diff)
downloadframeworks_native-7f42a9c47c5a7f40cf02032d286d6bd62f28e650.tar.gz
frameworks_native-7f42a9c47c5a7f40cf02032d286d6bd62f28e650.tar.bz2
frameworks_native-7f42a9c47c5a7f40cf02032d286d6bd62f28e650.zip
triple buffering is now controled by BoardConfig and enabled by default
use TARGET_DISABLE_TRIPLE_BUFFERING := true to disable triple buffering. Change-Id: I9875d6ddefd23c1af9e51e7ee7dec1bacd1e6799
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/Android.mk12
-rw-r--r--services/surfaceflinger/Layer.cpp8
2 files changed, 10 insertions, 10 deletions
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index d2e01101f..8b1645661 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -20,19 +20,19 @@ LOCAL_SRC_FILES:= \
LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-ifeq ($(TARGET_HAS_WAITFORVSYNC), true)
- LOCAL_CFLAGS += -DHAS_WAITFORVSYNC
-endif
-
ifeq ($(TARGET_BOARD_PLATFORM), omap3)
LOCAL_CFLAGS += -DNO_RGBX_8888
endif
ifeq ($(TARGET_BOARD_PLATFORM), omap4)
LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
- LOCAL_CFLAGS += -DUSE_TRIPLE_BUFFERING
endif
ifeq ($(TARGET_BOARD_PLATFORM), s5pc110)
- LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY -DNEVER_DEFAULT_TO_ASYNC_MODE
+ LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
+ LOCAL_CFLAGS += -DNEVER_DEFAULT_TO_ASYNC_MODE
+endif
+
+ifeq ($(TARGET_DISABLE_TRIPLE_BUFFERING), true)
+ LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING
endif
LOCAL_SHARED_LIBRARIES := \
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 464307144..6d77daf3a 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -110,11 +110,11 @@ void Layer::onFirstRef()
mSurfaceTexture->setFrameAvailableListener(new FrameQueuedListener(this));
mSurfaceTexture->setSynchronousMode(true);
-#ifdef USE_TRIPLE_BUFFERING
-#warning "using triple buffering"
- mSurfaceTexture->setBufferCountServer(3);
-#else
+#ifdef TARGET_DISABLE_TRIPLE_BUFFERING
+#warning "disabling triple buffering"
mSurfaceTexture->setBufferCountServer(2);
+#else
+ mSurfaceTexture->setBufferCountServer(3);
#endif
}