Merge "SurfaceFlinger: make the num FBs a board config" into jb-mr1-dev
This commit is contained in:
commit
dd57d55194
@ -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 \
|
||||
|
@ -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) {
|
||||
|
@ -22,8 +22,6 @@
|
||||
|
||||
#include <gui/ConsumerBase.h>
|
||||
|
||||
#define NUM_FRAME_BUFFERS 2
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
namespace android {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user