* commit 'ec93e762afc46534aadb3f583dbf87e38e85bfe9': SurfaceFlinger: make the num FBs a board config
This commit is contained in:
commit
ea5ef70398
@ -38,6 +38,10 @@ ifeq ($(TARGET_DISABLE_TRIPLE_BUFFERING),true)
|
|||||||
LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING
|
LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
|
||||||
|
LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
|
||||||
|
endif
|
||||||
|
|
||||||
LOCAL_SHARED_LIBRARIES := \
|
LOCAL_SHARED_LIBRARIES := \
|
||||||
libcutils \
|
libcutils \
|
||||||
libdl \
|
libdl \
|
||||||
|
@ -36,6 +36,10 @@
|
|||||||
#include "DisplayHardware/GraphicBufferAlloc.h"
|
#include "DisplayHardware/GraphicBufferAlloc.h"
|
||||||
#include "DisplayHardware/HWComposer.h"
|
#include "DisplayHardware/HWComposer.h"
|
||||||
|
|
||||||
|
#ifndef NUM_FRAMEBUFFER_SURFACE_BUFFERS
|
||||||
|
#define NUM_FRAMEBUFFER_SURFACE_BUFFERS (2)
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
namespace android {
|
namespace android {
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -61,7 +65,7 @@ FramebufferSurface::FramebufferSurface(HWComposer& hwc, int disp) :
|
|||||||
mBufferQueue->setDefaultBufferFormat(mHwc.getFormat(disp));
|
mBufferQueue->setDefaultBufferFormat(mHwc.getFormat(disp));
|
||||||
mBufferQueue->setDefaultBufferSize(mHwc.getWidth(disp), mHwc.getHeight(disp));
|
mBufferQueue->setDefaultBufferSize(mHwc.getWidth(disp), mHwc.getHeight(disp));
|
||||||
mBufferQueue->setSynchronousMode(true);
|
mBufferQueue->setSynchronousMode(true);
|
||||||
mBufferQueue->setDefaultMaxBufferCount(NUM_FRAME_BUFFERS);
|
mBufferQueue->setDefaultMaxBufferCount(NUM_FRAMEBUFFER_SURFACE_BUFFERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t FramebufferSurface::nextBuffer(sp<GraphicBuffer>& outBuffer, sp<Fence>& outFence) {
|
status_t FramebufferSurface::nextBuffer(sp<GraphicBuffer>& outBuffer, sp<Fence>& outFence) {
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
|
|
||||||
#include <gui/ConsumerBase.h>
|
#include <gui/ConsumerBase.h>
|
||||||
|
|
||||||
#define NUM_FRAME_BUFFERS 2
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
namespace android {
|
namespace android {
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user