Loading cmds/flatland/GLHelper.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ namespace android { GLHelper::GLHelper() : mGraphicBufferAlloc(new GraphicBufferAlloc()), mDisplay(EGL_NO_DISPLAY), mContext(EGL_NO_CONTEXT), mDummySurface(EGL_NO_SURFACE), Loading Loading @@ -202,7 +203,7 @@ bool GLHelper::createNamedSurfaceTexture(GLuint name, uint32_t w, uint32_t h, sp<GLConsumer>* glConsumer, EGLSurface* surface) { sp<IGraphicBufferProducer> producer; sp<IGraphicBufferConsumer> consumer; BufferQueue::createBufferQueue(&producer, &consumer); BufferQueue::createBufferQueue(&producer, &consumer, mGraphicBufferAlloc); sp<GLConsumer> glc = new GLConsumer(consumer, name, GL_TEXTURE_EXTERNAL_OES, false, true); glc->setDefaultBufferSize(w, h); Loading cmds/flatland/GLHelper.h +3 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ * limitations under the License. */ #include <gui/GraphicBufferAlloc.h> #include <gui/GLConsumer.h> #include <gui/Surface.h> #include <gui/SurfaceControl.h> Loading Loading @@ -74,6 +75,8 @@ private: bool setUpShaders(const ShaderDesc* shaderDescs, size_t numShaders); sp<GraphicBufferAlloc> mGraphicBufferAlloc; EGLDisplay mDisplay; EGLContext mContext; EGLSurface mDummySurface; Loading include/gui/BufferQueue.h +2 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,8 @@ public: // producers and consumers. allocator is used to allocate all the // needed gralloc buffers. static void createBufferQueue(sp<IGraphicBufferProducer>* outProducer, sp<IGraphicBufferConsumer>* outConsumer); sp<IGraphicBufferConsumer>* outConsumer, const sp<IGraphicBufferAlloc>& allocator = NULL); private: BufferQueue(); // Create through createBufferQueue Loading include/gui/BufferQueueCore.h +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public: // BufferQueueCore manages a pool of gralloc memory slots to be used by // producers and consumers. allocator is used to allocate all the needed // gralloc buffers. BufferQueueCore(); BufferQueueCore(const sp<IGraphicBufferAlloc>& allocator = NULL); virtual ~BufferQueueCore(); private: Loading libs/gui/BufferQueue.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -62,13 +62,14 @@ void BufferQueue::ProxyConsumerListener::onSidebandStreamChanged() { } void BufferQueue::createBufferQueue(sp<IGraphicBufferProducer>* outProducer, sp<IGraphicBufferConsumer>* outConsumer) { sp<IGraphicBufferConsumer>* outConsumer, const sp<IGraphicBufferAlloc>& allocator) { LOG_ALWAYS_FATAL_IF(outProducer == NULL, "BufferQueue: outProducer must not be NULL"); LOG_ALWAYS_FATAL_IF(outConsumer == NULL, "BufferQueue: outConsumer must not be NULL"); sp<BufferQueueCore> core(new BufferQueueCore()); sp<BufferQueueCore> core(new BufferQueueCore(allocator)); LOG_ALWAYS_FATAL_IF(core == NULL, "BufferQueue: failed to create BufferQueueCore"); Loading Loading
cmds/flatland/GLHelper.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ namespace android { GLHelper::GLHelper() : mGraphicBufferAlloc(new GraphicBufferAlloc()), mDisplay(EGL_NO_DISPLAY), mContext(EGL_NO_CONTEXT), mDummySurface(EGL_NO_SURFACE), Loading Loading @@ -202,7 +203,7 @@ bool GLHelper::createNamedSurfaceTexture(GLuint name, uint32_t w, uint32_t h, sp<GLConsumer>* glConsumer, EGLSurface* surface) { sp<IGraphicBufferProducer> producer; sp<IGraphicBufferConsumer> consumer; BufferQueue::createBufferQueue(&producer, &consumer); BufferQueue::createBufferQueue(&producer, &consumer, mGraphicBufferAlloc); sp<GLConsumer> glc = new GLConsumer(consumer, name, GL_TEXTURE_EXTERNAL_OES, false, true); glc->setDefaultBufferSize(w, h); Loading
cmds/flatland/GLHelper.h +3 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ * limitations under the License. */ #include <gui/GraphicBufferAlloc.h> #include <gui/GLConsumer.h> #include <gui/Surface.h> #include <gui/SurfaceControl.h> Loading Loading @@ -74,6 +75,8 @@ private: bool setUpShaders(const ShaderDesc* shaderDescs, size_t numShaders); sp<GraphicBufferAlloc> mGraphicBufferAlloc; EGLDisplay mDisplay; EGLContext mContext; EGLSurface mDummySurface; Loading
include/gui/BufferQueue.h +2 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,8 @@ public: // producers and consumers. allocator is used to allocate all the // needed gralloc buffers. static void createBufferQueue(sp<IGraphicBufferProducer>* outProducer, sp<IGraphicBufferConsumer>* outConsumer); sp<IGraphicBufferConsumer>* outConsumer, const sp<IGraphicBufferAlloc>& allocator = NULL); private: BufferQueue(); // Create through createBufferQueue Loading
include/gui/BufferQueueCore.h +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public: // BufferQueueCore manages a pool of gralloc memory slots to be used by // producers and consumers. allocator is used to allocate all the needed // gralloc buffers. BufferQueueCore(); BufferQueueCore(const sp<IGraphicBufferAlloc>& allocator = NULL); virtual ~BufferQueueCore(); private: Loading
libs/gui/BufferQueue.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -62,13 +62,14 @@ void BufferQueue::ProxyConsumerListener::onSidebandStreamChanged() { } void BufferQueue::createBufferQueue(sp<IGraphicBufferProducer>* outProducer, sp<IGraphicBufferConsumer>* outConsumer) { sp<IGraphicBufferConsumer>* outConsumer, const sp<IGraphicBufferAlloc>& allocator) { LOG_ALWAYS_FATAL_IF(outProducer == NULL, "BufferQueue: outProducer must not be NULL"); LOG_ALWAYS_FATAL_IF(outConsumer == NULL, "BufferQueue: outConsumer must not be NULL"); sp<BufferQueueCore> core(new BufferQueueCore()); sp<BufferQueueCore> core(new BufferQueueCore(allocator)); LOG_ALWAYS_FATAL_IF(core == NULL, "BufferQueue: failed to create BufferQueueCore"); Loading