diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h index 255afdd3c..f5f9ea714 100644 --- a/include/gui/SurfaceTexture.h +++ b/include/gui/SurfaceTexture.h @@ -28,6 +28,7 @@ struct SurfaceTexture { void incStrong(android::sp* const) {} void getTransformMatrix(float mtx[16]) {} void setFrameAvailableListener(const sp&) {} + void setSynchronousMode(bool) {} }; static sp SurfaceTexture_getSurfaceTexture(JNIEnv* env, jobject thiz) diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h index 0be26a79a..1da9729d4 100644 --- a/include/ui/GraphicBuffer.h +++ b/include/ui/GraphicBuffer.h @@ -74,6 +74,8 @@ public: GraphicBuffer(); + GraphicBuffer(android_native_buffer_t*, bool); + // creates w * h buffer GraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t usage); diff --git a/include/ui/android_native_buffer.h b/include/ui/android_native_buffer.h index a472824bc..85a1638aa 100644 --- a/include/ui/android_native_buffer.h +++ b/include/ui/android_native_buffer.h @@ -63,6 +63,7 @@ typedef struct android_native_buffer_t void* reserved_proc[8]; } android_native_buffer_t; +#define ANativeWindowBuffer android_native_buffer_t /*****************************************************************************/ diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp index 367195439..d9efeab4b 100644 --- a/libs/ui/GraphicBuffer.cpp +++ b/libs/ui/GraphicBuffer.cpp @@ -49,6 +49,19 @@ GraphicBuffer::GraphicBuffer() handle = NULL; } +GraphicBuffer::GraphicBuffer(android_native_buffer_t*, bool) + : BASE(), mOwner(ownData), mBufferMapper(GraphicBufferMapper::get()), + mInitCheck(NO_ERROR), mIndex(-1) +{ + width = + height = + stride = + format = + usage = 0; + transform = 0; + handle = NULL; +} + GraphicBuffer::GraphicBuffer(uint32_t w, uint32_t h, PixelFormat reqFormat, uint32_t reqUsage) : BASE(), mOwner(ownData), mBufferMapper(GraphicBufferMapper::get()),