Loading cmds/flatland/GLHelper.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -199,8 +199,8 @@ bool GLHelper::getShaderProgram(const char* name, GLuint* outPgm) { bool GLHelper::createNamedSurfaceTexture(GLuint name, uint32_t w, uint32_t h, sp<GLConsumer>* glConsumer, EGLSurface* surface) { sp<BufferQueue> bq = new BufferQueue(true, mGraphicBufferAlloc); sp<GLConsumer> glc = new GLConsumer(name, true, GL_TEXTURE_EXTERNAL_OES, false, bq); sp<GLConsumer> glc = new GLConsumer(bq, name, GL_TEXTURE_EXTERNAL_OES, false); glc->setDefaultBufferSize(w, h); glc->setDefaultMaxBufferCount(3); glc->setConsumerUsageBits(GRALLOC_USAGE_HW_COMPOSER); Loading include/gui/BufferItemConsumer.h +3 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ namespace android { class BufferQueue; /** * BufferItemConsumer is a BufferQueue consumer endpoint that allows clients * access to the whole BufferItem entry from BufferQueue. Multiple buffers may Loading @@ -49,7 +51,7 @@ class BufferItemConsumer: public ConsumerBase // the consumer usage flags passed to the graphics allocator. The // bufferCount parameter specifies how many buffers can be locked for user // access at the same time. BufferItemConsumer(uint32_t consumerUsage, BufferItemConsumer(const sp<BufferQueue>& bq, uint32_t consumerUsage, int bufferCount = BufferQueue::MIN_UNDEQUEUED_BUFFERS, bool synchronousMode = false); Loading include/gui/CpuConsumer.h +4 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ namespace android { class BufferQueue; /** * CpuConsumer is a BufferQueue consumer endpoint that allows direct CPU * access to the underlying gralloc buffers provided by BufferQueue. Multiple Loading Loading @@ -64,7 +66,8 @@ class CpuConsumer : public ConsumerBase // Create a new CPU consumer. The maxLockedBuffers parameter specifies // how many buffers can be locked for user access at the same time. CpuConsumer(uint32_t maxLockedBuffers, bool synchronousMode = true); CpuConsumer(const sp<BufferQueue>& bq, uint32_t maxLockedBuffers, bool synchronousMode = true); virtual ~CpuConsumer(); Loading include/gui/GLConsumer.h +3 −3 Original line number Diff line number Diff line Loading @@ -85,9 +85,9 @@ public: // purely to allow a GLConsumer to be transferred from one consumer // context to another. If such a transfer is not needed there is no // requirement that either of these methods be called. GLConsumer(GLuint tex, bool allowSynchronousMode = true, GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, bool useFenceSync = true, const sp<BufferQueue> &bufferQueue = 0); GLConsumer(const sp<BufferQueue>& bq, GLuint tex, GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, bool useFenceSync = true); // updateTexImage acquires the most recently queued buffer, and sets the // image contents of the target texture to it. Loading libs/gui/BufferItemConsumer.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -29,9 +29,9 @@ namespace android { BufferItemConsumer::BufferItemConsumer(uint32_t consumerUsage, int bufferCount, bool synchronousMode) : ConsumerBase(new BufferQueue(true) ) BufferItemConsumer::BufferItemConsumer(const sp<BufferQueue>& bq, uint32_t consumerUsage, int bufferCount, bool synchronousMode) : ConsumerBase(bq) { mBufferQueue->setConsumerUsageBits(consumerUsage); mBufferQueue->setSynchronousMode(synchronousMode); Loading Loading
cmds/flatland/GLHelper.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -199,8 +199,8 @@ bool GLHelper::getShaderProgram(const char* name, GLuint* outPgm) { bool GLHelper::createNamedSurfaceTexture(GLuint name, uint32_t w, uint32_t h, sp<GLConsumer>* glConsumer, EGLSurface* surface) { sp<BufferQueue> bq = new BufferQueue(true, mGraphicBufferAlloc); sp<GLConsumer> glc = new GLConsumer(name, true, GL_TEXTURE_EXTERNAL_OES, false, bq); sp<GLConsumer> glc = new GLConsumer(bq, name, GL_TEXTURE_EXTERNAL_OES, false); glc->setDefaultBufferSize(w, h); glc->setDefaultMaxBufferCount(3); glc->setConsumerUsageBits(GRALLOC_USAGE_HW_COMPOSER); Loading
include/gui/BufferItemConsumer.h +3 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ namespace android { class BufferQueue; /** * BufferItemConsumer is a BufferQueue consumer endpoint that allows clients * access to the whole BufferItem entry from BufferQueue. Multiple buffers may Loading @@ -49,7 +51,7 @@ class BufferItemConsumer: public ConsumerBase // the consumer usage flags passed to the graphics allocator. The // bufferCount parameter specifies how many buffers can be locked for user // access at the same time. BufferItemConsumer(uint32_t consumerUsage, BufferItemConsumer(const sp<BufferQueue>& bq, uint32_t consumerUsage, int bufferCount = BufferQueue::MIN_UNDEQUEUED_BUFFERS, bool synchronousMode = false); Loading
include/gui/CpuConsumer.h +4 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ namespace android { class BufferQueue; /** * CpuConsumer is a BufferQueue consumer endpoint that allows direct CPU * access to the underlying gralloc buffers provided by BufferQueue. Multiple Loading Loading @@ -64,7 +66,8 @@ class CpuConsumer : public ConsumerBase // Create a new CPU consumer. The maxLockedBuffers parameter specifies // how many buffers can be locked for user access at the same time. CpuConsumer(uint32_t maxLockedBuffers, bool synchronousMode = true); CpuConsumer(const sp<BufferQueue>& bq, uint32_t maxLockedBuffers, bool synchronousMode = true); virtual ~CpuConsumer(); Loading
include/gui/GLConsumer.h +3 −3 Original line number Diff line number Diff line Loading @@ -85,9 +85,9 @@ public: // purely to allow a GLConsumer to be transferred from one consumer // context to another. If such a transfer is not needed there is no // requirement that either of these methods be called. GLConsumer(GLuint tex, bool allowSynchronousMode = true, GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, bool useFenceSync = true, const sp<BufferQueue> &bufferQueue = 0); GLConsumer(const sp<BufferQueue>& bq, GLuint tex, GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, bool useFenceSync = true); // updateTexImage acquires the most recently queued buffer, and sets the // image contents of the target texture to it. Loading
libs/gui/BufferItemConsumer.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -29,9 +29,9 @@ namespace android { BufferItemConsumer::BufferItemConsumer(uint32_t consumerUsage, int bufferCount, bool synchronousMode) : ConsumerBase(new BufferQueue(true) ) BufferItemConsumer::BufferItemConsumer(const sp<BufferQueue>& bq, uint32_t consumerUsage, int bufferCount, bool synchronousMode) : ConsumerBase(bq) { mBufferQueue->setConsumerUsageBits(consumerUsage); mBufferQueue->setSynchronousMode(synchronousMode); Loading