am dd57d551: Merge "SurfaceFlinger: make the num FBs a board config" into jb-mr1-dev

* commit 'dd57d551944c01394bc2807d962be4953c58c7c1':
  SurfaceFlinger: make the num FBs a board config
This commit is contained in:
Jamie Gennis 2012-10-12 14:37:22 -07:00 committed by Android Git Automerger
commit ec93e762af
3 changed files with 9 additions and 3 deletions

View File

@ -38,6 +38,10 @@ ifeq ($(TARGET_DISABLE_TRIPLE_BUFFERING),true)
LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING
endif
ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
endif
LOCAL_SHARED_LIBRARIES := \
libcutils \
libdl \

View File

@ -36,6 +36,10 @@
#include "DisplayHardware/GraphicBufferAlloc.h"
#include "DisplayHardware/HWComposer.h"
#ifndef NUM_FRAMEBUFFER_SURFACE_BUFFERS
#define NUM_FRAMEBUFFER_SURFACE_BUFFERS (2)
#endif
// ----------------------------------------------------------------------------
namespace android {
// ----------------------------------------------------------------------------
@ -61,7 +65,7 @@ FramebufferSurface::FramebufferSurface(HWComposer& hwc, int disp) :
mBufferQueue->setDefaultBufferFormat(mHwc.getFormat(disp));
mBufferQueue->setDefaultBufferSize(mHwc.getWidth(disp), mHwc.getHeight(disp));
mBufferQueue->setSynchronousMode(true);
mBufferQueue->setDefaultMaxBufferCount(NUM_FRAME_BUFFERS);
mBufferQueue->setDefaultMaxBufferCount(NUM_FRAMEBUFFER_SURFACE_BUFFERS);
}
status_t FramebufferSurface::nextBuffer(sp<GraphicBuffer>& outBuffer, sp<Fence>& outFence) {

View File

@ -22,8 +22,6 @@
#include <gui/ConsumerBase.h>
#define NUM_FRAME_BUFFERS 2
// ---------------------------------------------------------------------------
namespace android {
// ---------------------------------------------------------------------------