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

Commit 34350c89 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

Merge remote-tracking branch 'caf-rebase' into cm-11.0

Change-Id: I7216c277f2f5ebafe349f0849957df8900ca0084
parents 509e43d8 622d1650
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -207,10 +207,17 @@ public:
    // connected to the specified producer API.
    virtual status_t disconnect(int api);

    // setBufferSize enables us to specify user defined sizes for the buffers
    // that need to be allocated by surfaceflinger for its client. This is
    // useful for cases where the client doesn't want the gralloc to calculate
    // buffer size. client should reset this value to 0, if it wants gralloc
    // to calculate the size for the buffer. this will take effect from next
    // dequeue buffer.
    virtual status_t setBuffersSize(int size);

    /*
     * IGraphicBufferConsumer interface
     */

    // acquireBuffer attempts to acquire ownership of the next pending buffer in
    // the BufferQueue.  If no buffer is pending then it returns -EINVAL.  If a
    // buffer is successfully acquired, the information about the buffer is
+3 −0
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ public:
    virtual ~GraphicBufferAlloc();
    virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
        PixelFormat format, uint32_t usage, status_t* error);
    virtual void setGraphicBufferSize(int size);
private:
    int mBufferSize;
};


+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ public:
     */
    virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
            PixelFormat format, uint32_t usage, status_t* error) = 0;
    virtual void setGraphicBufferSize(int size) = 0;
};

// ----------------------------------------------------------------------------
+9 −0
Original line number Diff line number Diff line
@@ -204,6 +204,15 @@ public:
    // This method will fail if the the IGraphicBufferProducer is not currently
    // connected to the specified client API.
    virtual status_t disconnect(int api) = 0;

    // setBufferSize enables to specify the user defined size of the buffer
    // that needs to be allocated by surfaceflinger for its client. This is
    // useful for cases where the client doesn't want the gralloc to calculate
    // buffer size. client should reset this value to 0, if it wants gralloc to
    // calculate the size for the buffer. this will take effect from next
    // dequeue buffer.
    virtual status_t setBuffersSize(int size) = 0;

};

// ----------------------------------------------------------------------------
+6 −0
Original line number Diff line number Diff line
@@ -119,6 +119,7 @@ private:
    int dispatchSetCrop(va_list args);
    int dispatchSetPostTransformCrop(va_list args);
    int dispatchSetUsage(va_list args);
    int dispatchSetBuffersSize(va_list args);
    int dispatchLock(va_list args);
    int dispatchUnlockAndPost(va_list args);

@@ -143,6 +144,7 @@ protected:
    virtual int setBuffersTimestamp(int64_t timestamp);
    virtual int setCrop(Rect const* rect);
    virtual int setUsage(uint32_t reqUsage);
    virtual int setBuffersSize(int size);

public:
    virtual int lock(ANativeWindow_Buffer* outBuffer, ARect* inOutDirtyBounds);
@@ -191,6 +193,10 @@ private:
    // at the next deuque operation. It is initialized to 0.
    uint32_t mReqUsage;

    // mReqSize is the size of the buffer that will be requested
    // at the next dequeue operation. It is initialized to 0.
    uint32_t mReqSize;

    // mTimestamp is the timestamp that will be used for the next buffer queue
    // operation. It defaults to NATIVE_WINDOW_TIMESTAMP_AUTO, which means that
    // a timestamp is auto-generated when queueBuffer is called.
Loading