Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4639b1e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Get rid of IGraphicBufferAlloc"

parents 3680cbc7 78491c9f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@
 namespace android {

GLHelper::GLHelper() :
    mGraphicBufferAlloc(new GraphicBufferAlloc()),
    mDisplay(EGL_NO_DISPLAY),
    mContext(EGL_NO_CONTEXT),
    mDummySurface(EGL_NO_SURFACE),
@@ -203,7 +202,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, mGraphicBufferAlloc);
    BufferQueue::createBufferQueue(&producer, &consumer);
    sp<GLConsumer> glc = new GLConsumer(consumer, name,
            GL_TEXTURE_EXTERNAL_OES, false, true);
    glc->setDefaultBufferSize(w, h);
+0 −3
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
 * limitations under the License.
 */

#include <gui/GraphicBufferAlloc.h>
#include <gui/GLConsumer.h>
#include <gui/Surface.h>
#include <gui/SurfaceControl.h>
@@ -75,8 +74,6 @@ private:

    bool setUpShaders(const ShaderDesc* shaderDescs, size_t numShaders);

    sp<GraphicBufferAlloc> mGraphicBufferAlloc;

    EGLDisplay mDisplay;
    EGLContext mContext;
    EGLSurface mDummySurface;
+0 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

#define ATRACE_TAG ATRACE_TAG_ALWAYS

#include <gui/GraphicBufferAlloc.h>
#include <gui/Surface.h>
#include <gui/SurfaceControl.h>
#include <gui/GLConsumer.h>
+1 −7
Original line number Diff line number Diff line
@@ -23,10 +23,6 @@
#include <gui/IGraphicBufferProducer.h>
#include <gui/IConsumerListener.h>

// These are only required to keep other parts of the framework with incomplete
// dependencies building successfully
#include <gui/IGraphicBufferAlloc.h>

namespace android {

class BufferQueue {
@@ -81,11 +77,9 @@ public:
    // needed gralloc buffers.
    static void createBufferQueue(sp<IGraphicBufferProducer>* outProducer,
            sp<IGraphicBufferConsumer>* outConsumer,
            const sp<IGraphicBufferAlloc>& allocator = NULL,
            bool consumerIsSurfaceFlinger = false);

private:
    BufferQueue(); // Create through createBufferQueue
    BufferQueue() = delete; // Create through createBufferQueue
};

// ----------------------------------------------------------------------------
+2 −8
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@
namespace android {

class IConsumerListener;
class IGraphicBufferAlloc;
class IProducerListener;

class BufferQueueCore : public virtual RefBase {
@@ -79,9 +78,8 @@ public:
    typedef Vector<BufferItem> Fifo;

    // 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(const sp<IGraphicBufferAlloc>& allocator = NULL);
    // producers and consumers.
    BufferQueueCore();
    virtual ~BufferQueueCore();

private:
@@ -143,10 +141,6 @@ private:
    void validateConsistencyLocked() const;
#endif

    // mAllocator is the connection to SurfaceFlinger that is used to allocate
    // new GraphicBuffer objects.
    sp<IGraphicBufferAlloc> mAllocator;

    // mMutex is the mutex used to prevent concurrent access to the member
    // variables of BufferQueueCore objects. It must be locked whenever any
    // member variable is accessed.
Loading