From e7758be6da85728df6b4215f413660c67c5a9740 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 14 Nov 2011 19:17:37 -0800 Subject: enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices this flag should be enabled for all targets, but currently some have issues with it, so we're turning it on only for tested targets. this will hopefully resolve some performance issues. Bug: 5553562 Change-Id: I939992b4cd0debea980dec0127c72be2dff33af8 --- libs/gui/SurfaceTexture.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libs/gui/SurfaceTexture.cpp') diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp index 6f842067caf7..374f3c524019 100644 --- a/libs/gui/SurfaceTexture.cpp +++ b/libs/gui/SurfaceTexture.cpp @@ -36,8 +36,12 @@ #include #include - -#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__) @@ -323,7 +327,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) { -- cgit v1.2.3-59-g8ed1b