Loading include/gui/Surface.h +4 −0 Original line number Diff line number Diff line Loading @@ -260,6 +260,10 @@ private: // must be accessed from lock/unlock thread only Region mDirtyRegion; #ifdef SURFACE_SKIP_FIRST_DEQUEUE bool mDequeuedOnce; #endif }; }; // namespace android Loading libs/gui/Android.mk +4 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,10 @@ endif LOCAL_CFLAGS += -DQCOM_BSP endif ifeq ($(BOARD_EGL_SKIP_FIRST_DEQUEUE),true) LOCAL_CFLAGS += -DSURFACE_SKIP_FIRST_DEQUEUE endif LOCAL_MODULE:= libgui ifeq ($(TARGET_BOARD_PLATFORM), tegra) Loading libs/gui/Surface.cpp +18 −5 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ Surface::Surface( mConnectedToCpu = false; mProducerControlledByApp = controlledByApp; mSwapIntervalZero = false; #ifdef SURFACE_SKIP_FIRST_DEQUEUE mDequeuedOnce = false; #endif } Surface::~Surface() { Loading Loading @@ -229,6 +232,9 @@ int Surface::dequeueBuffer(android_native_buffer_t** buffer, int* fenceFd) { } *buffer = gbuf.get(); #ifdef SURFACE_SKIP_FIRST_DEQUEUE if (!mDequeuedOnce) mDequeuedOnce = true; #endif return OK; } Loading Loading @@ -319,6 +325,12 @@ int Surface::query(int what, int* value) const { } break; case NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER: { #ifdef SURFACE_SKIP_FIRST_DEQUEUE if (!mDequeuedOnce) { *value = 0; } else #endif { sp<ISurfaceComposer> composer( ComposerService::getComposerService()); if (composer->authenticateSurfaceTexture(mGraphicBufferProducer)) { Loading @@ -326,6 +338,7 @@ int Surface::query(int what, int* value) const { } else { *value = 0; } } return NO_ERROR; } case NATIVE_WINDOW_CONCRETE_TYPE: Loading Loading
include/gui/Surface.h +4 −0 Original line number Diff line number Diff line Loading @@ -260,6 +260,10 @@ private: // must be accessed from lock/unlock thread only Region mDirtyRegion; #ifdef SURFACE_SKIP_FIRST_DEQUEUE bool mDequeuedOnce; #endif }; }; // namespace android Loading
libs/gui/Android.mk +4 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,10 @@ endif LOCAL_CFLAGS += -DQCOM_BSP endif ifeq ($(BOARD_EGL_SKIP_FIRST_DEQUEUE),true) LOCAL_CFLAGS += -DSURFACE_SKIP_FIRST_DEQUEUE endif LOCAL_MODULE:= libgui ifeq ($(TARGET_BOARD_PLATFORM), tegra) Loading
libs/gui/Surface.cpp +18 −5 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ Surface::Surface( mConnectedToCpu = false; mProducerControlledByApp = controlledByApp; mSwapIntervalZero = false; #ifdef SURFACE_SKIP_FIRST_DEQUEUE mDequeuedOnce = false; #endif } Surface::~Surface() { Loading Loading @@ -229,6 +232,9 @@ int Surface::dequeueBuffer(android_native_buffer_t** buffer, int* fenceFd) { } *buffer = gbuf.get(); #ifdef SURFACE_SKIP_FIRST_DEQUEUE if (!mDequeuedOnce) mDequeuedOnce = true; #endif return OK; } Loading Loading @@ -319,6 +325,12 @@ int Surface::query(int what, int* value) const { } break; case NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER: { #ifdef SURFACE_SKIP_FIRST_DEQUEUE if (!mDequeuedOnce) { *value = 0; } else #endif { sp<ISurfaceComposer> composer( ComposerService::getComposerService()); if (composer->authenticateSurfaceTexture(mGraphicBufferProducer)) { Loading @@ -326,6 +338,7 @@ int Surface::query(int what, int* value) const { } else { *value = 0; } } return NO_ERROR; } case NATIVE_WINDOW_CONCRETE_TYPE: Loading