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

Commit 78491c9f authored by Mathias Agopian's avatar Mathias Agopian
Browse files

Get rid of IGraphicBufferAlloc

This reverts commit 527747dc.

selinux policy allowing this change fixed.

Test: took a screenshot
Test: ran ImageReaderTest CTS
Bug: 36194109
Change-Id: I72ac17b6c252750aa2a66cd1d94bd8b4e21b5e9d
parent bb68dcc8
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