diff --git a/libgralloc/Android.mk b/libgralloc/Android.mk index fd4cacb..ddf9743 100644 --- a/libgralloc/Android.mk +++ b/libgralloc/Android.mk @@ -25,7 +25,7 @@ LOCAL_C_INCLUDES += hardware/qcom/display/libgenlock LOCAL_C_INCLUDES += hardware/qcom/display/libqdutils LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM) LOCAL_MODULE_TAGS := optional -LOCAL_CFLAGS := -DLOG_TAG=\"$(TARGET_BOARD_PLATFORM).gralloc\" \ +LOCAL_CFLAGS := -DLOG_TAG=\"gralloc\" \ -DDEBUG_CALC_FPS -Wno-missing-field-initializers LOCAL_SRC_FILES := gpu.cpp gralloc.cpp framebuffer.cpp mapper.cpp diff --git a/libgralloc/fb_priv.h b/libgralloc/fb_priv.h index 21bfac4..628a961 100644 --- a/libgralloc/fb_priv.h +++ b/libgralloc/fb_priv.h @@ -20,8 +20,7 @@ #include #define NUM_FRAMEBUFFERS_MIN 2 -//XXX: Enable triple framebuffers -#define NUM_FRAMEBUFFERS_MAX 2 +#define NUM_FRAMEBUFFERS_MAX 3 #define NO_SURFACEFLINGER_SWAPINTERVAL #define COLOR_FORMAT(x) (x & 0xFFF) // Max range for colorFormats is 0 - FFF diff --git a/libgralloc/framebuffer.cpp b/libgralloc/framebuffer.cpp index 1e03a88..276cc42 100644 --- a/libgralloc/framebuffer.cpp +++ b/libgralloc/framebuffer.cpp @@ -504,9 +504,10 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer) fb_context_t* ctx = (fb_context_t*)dev; - private_handle_t const* hnd = reinterpret_cast(buffer); - private_module_t* m = reinterpret_cast( - dev->common.module); + private_handle_t const* hnd = + reinterpret_cast(buffer); + private_module_t* m = + reinterpret_cast(dev->common.module); if (hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) { m->base.lock(&m->base, buffer, @@ -830,6 +831,7 @@ int fb_device_open(hw_module_t const* module, const char* name, const_cast(dev->device.fps) = m->fps; const_cast(dev->device.minSwapInterval) = PRIV_MIN_SWAP_INTERVAL; const_cast(dev->device.maxSwapInterval) = PRIV_MAX_SWAP_INTERVAL; + const_cast(dev->device.numFramebuffers) = m->numBuffers; if (m->finfo.reserved[0] == 0x5444 && m->finfo.reserved[1] == 0x5055) { dev->device.setUpdateRect = fb_setUpdateRect;