Loading include/gui/BufferQueue.h +8 −1 Original line number Diff line number Diff line Loading @@ -207,10 +207,17 @@ public: // connected to the specified producer API. virtual status_t disconnect(int api); // setBufferSize enables us to specify user defined sizes for the buffers // that need to be allocated by surfaceflinger for its client. This is // useful for cases where the client doesn't want the gralloc to calculate // buffer size. client should reset this value to 0, if it wants gralloc // to calculate the size for the buffer. this will take effect from next // dequeue buffer. virtual status_t setBuffersSize(int size); /* * IGraphicBufferConsumer interface */ // acquireBuffer attempts to acquire ownership of the next pending buffer in // the BufferQueue. If no buffer is pending then it returns -EINVAL. If a // buffer is successfully acquired, the information about the buffer is Loading include/gui/GraphicBufferAlloc.h +3 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,9 @@ public: virtual ~GraphicBufferAlloc(); virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t usage, status_t* error); virtual void setGraphicBufferSize(int size); private: int mBufferSize; }; Loading include/gui/IGraphicBufferAlloc.h +1 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ public: */ virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t usage, status_t* error) = 0; virtual void setGraphicBufferSize(int size) = 0; }; // ---------------------------------------------------------------------------- Loading include/gui/IGraphicBufferProducer.h +9 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,15 @@ public: // This method will fail if the the IGraphicBufferProducer is not currently // connected to the specified client API. virtual status_t disconnect(int api) = 0; // setBufferSize enables to specify the user defined size of the buffer // that needs to be allocated by surfaceflinger for its client. This is // useful for cases where the client doesn't want the gralloc to calculate // buffer size. client should reset this value to 0, if it wants gralloc to // calculate the size for the buffer. this will take effect from next // dequeue buffer. virtual status_t setBuffersSize(int size) = 0; }; // ---------------------------------------------------------------------------- Loading include/gui/Surface.h +6 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,7 @@ private: int dispatchSetCrop(va_list args); int dispatchSetPostTransformCrop(va_list args); int dispatchSetUsage(va_list args); int dispatchSetBuffersSize(va_list args); int dispatchLock(va_list args); int dispatchUnlockAndPost(va_list args); Loading @@ -143,6 +144,7 @@ protected: virtual int setBuffersTimestamp(int64_t timestamp); virtual int setCrop(Rect const* rect); virtual int setUsage(uint32_t reqUsage); virtual int setBuffersSize(int size); public: virtual int lock(ANativeWindow_Buffer* outBuffer, ARect* inOutDirtyBounds); Loading Loading @@ -191,6 +193,10 @@ private: // at the next deuque operation. It is initialized to 0. uint32_t mReqUsage; // mReqSize is the size of the buffer that will be requested // at the next dequeue operation. It is initialized to 0. uint32_t mReqSize; // mTimestamp is the timestamp that will be used for the next buffer queue // operation. It defaults to NATIVE_WINDOW_TIMESTAMP_AUTO, which means that // a timestamp is auto-generated when queueBuffer is called. Loading Loading
include/gui/BufferQueue.h +8 −1 Original line number Diff line number Diff line Loading @@ -207,10 +207,17 @@ public: // connected to the specified producer API. virtual status_t disconnect(int api); // setBufferSize enables us to specify user defined sizes for the buffers // that need to be allocated by surfaceflinger for its client. This is // useful for cases where the client doesn't want the gralloc to calculate // buffer size. client should reset this value to 0, if it wants gralloc // to calculate the size for the buffer. this will take effect from next // dequeue buffer. virtual status_t setBuffersSize(int size); /* * IGraphicBufferConsumer interface */ // acquireBuffer attempts to acquire ownership of the next pending buffer in // the BufferQueue. If no buffer is pending then it returns -EINVAL. If a // buffer is successfully acquired, the information about the buffer is Loading
include/gui/GraphicBufferAlloc.h +3 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,9 @@ public: virtual ~GraphicBufferAlloc(); virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t usage, status_t* error); virtual void setGraphicBufferSize(int size); private: int mBufferSize; }; Loading
include/gui/IGraphicBufferAlloc.h +1 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ public: */ virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t usage, status_t* error) = 0; virtual void setGraphicBufferSize(int size) = 0; }; // ---------------------------------------------------------------------------- Loading
include/gui/IGraphicBufferProducer.h +9 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,15 @@ public: // This method will fail if the the IGraphicBufferProducer is not currently // connected to the specified client API. virtual status_t disconnect(int api) = 0; // setBufferSize enables to specify the user defined size of the buffer // that needs to be allocated by surfaceflinger for its client. This is // useful for cases where the client doesn't want the gralloc to calculate // buffer size. client should reset this value to 0, if it wants gralloc to // calculate the size for the buffer. this will take effect from next // dequeue buffer. virtual status_t setBuffersSize(int size) = 0; }; // ---------------------------------------------------------------------------- Loading
include/gui/Surface.h +6 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,7 @@ private: int dispatchSetCrop(va_list args); int dispatchSetPostTransformCrop(va_list args); int dispatchSetUsage(va_list args); int dispatchSetBuffersSize(va_list args); int dispatchLock(va_list args); int dispatchUnlockAndPost(va_list args); Loading @@ -143,6 +144,7 @@ protected: virtual int setBuffersTimestamp(int64_t timestamp); virtual int setCrop(Rect const* rect); virtual int setUsage(uint32_t reqUsage); virtual int setBuffersSize(int size); public: virtual int lock(ANativeWindow_Buffer* outBuffer, ARect* inOutDirtyBounds); Loading Loading @@ -191,6 +193,10 @@ private: // at the next deuque operation. It is initialized to 0. uint32_t mReqUsage; // mReqSize is the size of the buffer that will be requested // at the next dequeue operation. It is initialized to 0. uint32_t mReqSize; // mTimestamp is the timestamp that will be used for the next buffer queue // operation. It defaults to NATIVE_WINDOW_TIMESTAMP_AUTO, which means that // a timestamp is auto-generated when queueBuffer is called. Loading