diff options
author | Mathias Agopian <mathias@google.com> | 2011-11-21 17:57:20 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-21 17:57:20 -0800 |
commit | 8646cd42df5edc5f5b9c52d6ab5309821e875656 (patch) | |
tree | 6434c3dc4ea983b856a0755cacd9d402e2a2d65e /libs/gui | |
parent | 8cd39e3a104d0739fd2f1ae73e5f4081f1528c6c (diff) | |
parent | e2fa30cba0c3412d07214dec346bb21a562d3461 (diff) | |
download | frameworks_base-8646cd42df5edc5f5b9c52d6ab5309821e875656.zip frameworks_base-8646cd42df5edc5f5b9c52d6ab5309821e875656.tar.gz frameworks_base-8646cd42df5edc5f5b9c52d6ab5309821e875656.tar.bz2 |
Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1
Diffstat (limited to 'libs/gui')
-rw-r--r-- | libs/gui/Android.mk | 4 | ||||
-rw-r--r-- | libs/gui/SurfaceTexture.cpp | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/libs/gui/Android.mk b/libs/gui/Android.mk index ed319f5..9767568 100644 --- a/libs/gui/Android.mk +++ b/libs/gui/Android.mk @@ -32,6 +32,10 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_MODULE:= libgui +ifeq ($(TARGET_BOARD_PLATFORM), tegra) + LOCAL_CFLAGS += -DALLOW_DEQUEUE_CURRENT_BUFFER +endif + include $(BUILD_SHARED_LIBRARY) ifeq (,$(ONE_SHOT_MAKEFILE)) diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp index 1aa0e2d..d4fabd9 100644 --- a/libs/gui/SurfaceTexture.cpp +++ b/libs/gui/SurfaceTexture.cpp @@ -36,8 +36,12 @@ #include <utils/Log.h> #include <utils/String8.h> - -#define ALLOW_DEQUEUE_CURRENT_BUFFER false +#ifdef ALLOW_DEQUEUE_CURRENT_BUFFER +#define FLAG_ALLOW_DEQUEUE_CURRENT_BUFFER true +#warning "ALLOW_DEQUEUE_CURRENT_BUFFER enabled" +#else +#define FLAG_ALLOW_DEQUEUE_CURRENT_BUFFER false +#endif // Macros for including the SurfaceTexture name in log messages #define ST_LOGV(x, ...) LOGV("[%s] "x, mName.string(), ##__VA_ARGS__) @@ -325,7 +329,7 @@ status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, LOGW_IF((state == BufferSlot::FREE) && (mCurrentTexture==i), "dequeueBuffer: buffer %d is both FREE and current!", i); - if (ALLOW_DEQUEUE_CURRENT_BUFFER) { + if (FLAG_ALLOW_DEQUEUE_CURRENT_BUFFER) { if (state == BufferSlot::FREE || i == mCurrentTexture) { foundSync = i; if (i != mCurrentTexture) { |