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

Commit 99295a2b authored by Mathias Agopian's avatar Mathias Agopian Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'igraphicbufferallocator'

* changes:
  get rid of IGraphicBufferAlloc
  Remove a dependency of EGL on ui/GraphicBuffer.h
  remove EGL dependency on libbinder
parents 54e1e10a 1da94dfe
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -25,7 +25,6 @@
 namespace android {
 namespace android {


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


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


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


    sp<GraphicBufferAlloc> mGraphicBufferAlloc;

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


#define ATRACE_TAG ATRACE_TAG_ALWAYS
#define ATRACE_TAG ATRACE_TAG_ALWAYS


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


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


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


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


class IConsumerListener;
class IConsumerListener;
class IGraphicBufferAlloc;
class IProducerListener;
class IProducerListener;


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


    // BufferQueueCore manages a pool of gralloc memory slots to be used by
    // BufferQueueCore manages a pool of gralloc memory slots to be used by
    // producers and consumers. allocator is used to allocate all the needed
    // producers and consumers.
    // gralloc buffers.
    BufferQueueCore();
    BufferQueueCore(const sp<IGraphicBufferAlloc>& allocator = NULL);
    virtual ~BufferQueueCore();
    virtual ~BufferQueueCore();


private:
private:
@@ -143,10 +141,6 @@ private:
    void validateConsistencyLocked() const;
    void validateConsistencyLocked() const;
#endif
#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
    // mMutex is the mutex used to prevent concurrent access to the member
    // variables of BufferQueueCore objects. It must be locked whenever any
    // variables of BufferQueueCore objects. It must be locked whenever any
    // member variable is accessed.
    // member variable is accessed.
Loading