summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gui/BufferQueue.h27
-rw-r--r--include/gui/ISurfaceTexture.h4
-rw-r--r--include/gui/SurfaceTextureClient.h2
-rw-r--r--include/ui/GraphicBuffer.h4
-rw-r--r--include/ui/GraphicBufferMapper.h5
5 files changed, 42 insertions, 0 deletions
diff --git a/include/gui/BufferQueue.h b/include/gui/BufferQueue.h
index 02598b01a..cd38cfeb4 100644
--- a/include/gui/BufferQueue.h
+++ b/include/gui/BufferQueue.h
@@ -33,6 +33,23 @@
namespace android {
// ----------------------------------------------------------------------------
+#ifdef QCOM_BSP
+/*
+ * Structure to hold the buffer geometry
+ */
+struct QBufGeometry {
+ int mWidth;
+ int mHeight;
+ int mFormat;
+ QBufGeometry(): mWidth(0), mHeight(0), mFormat(0) {}
+ void set(int w, int h, int f) {
+ mWidth = w;
+ mHeight = h;
+ mFormat = f;
+ }
+};
+#endif
+
class BufferQueue : public BnSurfaceTexture {
public:
enum { MIN_UNDEQUEUED_BUFFERS = 2 };
@@ -156,6 +173,11 @@ public:
// to calculate the size for the buffer. this will take effect from next
// dequeue buffer.
virtual status_t setBuffersSize(int size);
+
+ // update buffer width, height and format for a native buffer
+ // dynamically from the client which will take effect in the next
+ // queue buffer.
+ virtual status_t updateBuffersGeometry(int w, int h, int f);
#endif
// connect attempts to connect a producer client API to the BufferQueue.
@@ -547,6 +569,11 @@ private:
// mTransformHint is used to optimize for screen rotations
uint32_t mTransformHint;
+
+#ifdef QCOM_BSP
+ // holds the updated buffer geometry info of the new video resolution.
+ QBufGeometry mNextBufferInfo;
+#endif
};
// ----------------------------------------------------------------------------
diff --git a/include/gui/ISurfaceTexture.h b/include/gui/ISurfaceTexture.h
index f0beab636..f2a65103f 100644
--- a/include/gui/ISurfaceTexture.h
+++ b/include/gui/ISurfaceTexture.h
@@ -172,6 +172,10 @@ public:
// calculate the size for the buffer. this will take effect from next
// dequeue buffer.
virtual status_t setBuffersSize(int size) = 0;
+
+ // update buffer width, height and format information from the client
+ // which will take effect in the next queue buffer.
+ virtual status_t updateBuffersGeometry(int w, int h, int f) = 0;
#endif
// connect attempts to connect a client API to the SurfaceTexture. This
diff --git a/include/gui/SurfaceTextureClient.h b/include/gui/SurfaceTextureClient.h
index 108126d9e..f2b523da8 100644
--- a/include/gui/SurfaceTextureClient.h
+++ b/include/gui/SurfaceTextureClient.h
@@ -94,6 +94,7 @@ private:
int dispatchSetPostTransformCrop(va_list args);
int dispatchSetUsage(va_list args);
#ifdef QCOM_BSP
+ int dispatchUpdateBuffersGeometry(va_list args);
int dispatchSetBuffersSize(va_list args);
#endif
int dispatchLock(va_list args);
@@ -107,6 +108,7 @@ protected:
virtual int query(int what, int* value) const;
virtual int setSwapInterval(int interval);
#ifdef QCOM_BSP
+ virtual int updateBuffersGeometry(int w, int h, int f);
virtual int setBuffersSize(int size);
#endif
virtual int lockBuffer_DEPRECATED(ANativeWindowBuffer* buffer);
diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h
index 60bbf18ce..af8506375 100644
--- a/include/ui/GraphicBuffer.h
+++ b/include/ui/GraphicBuffer.h
@@ -103,6 +103,10 @@ public:
status_t lock(uint32_t usage, void** vaddr);
status_t lock(uint32_t usage, const Rect& rect, void** vaddr);
status_t unlock();
+#ifdef QCOM_BSP
+ status_t perform(buffer_handle_t hnd, int operation,
+ uint32_t w, uint32_t h, PixelFormat format);
+#endif
ANativeWindowBuffer* getNativeBuffer() const;
diff --git a/include/ui/GraphicBufferMapper.h b/include/ui/GraphicBufferMapper.h
index 1fdecab0d..858fb1b66 100644
--- a/include/ui/GraphicBufferMapper.h
+++ b/include/ui/GraphicBufferMapper.h
@@ -51,6 +51,11 @@ public:
status_t getphys(buffer_handle_t handle, void** paddr);
#endif
+#ifdef QCOM_BSP
+ status_t perform(buffer_handle_t handle, int operation,
+ uint32_t w, uint32_t h, uint32_t format);
+#endif
+
// dumps information about the mapping of this handle
void dump(buffer_handle_t handle);