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

Commit 87f9b877 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

remove unused code form GraphicBuffer

Change-Id: I0dd67f1f93f654331e8f17b55730931dbc695ca7
parent b304edb0
Loading
Loading
Loading
Loading
+6 −11
Original line number Diff line number Diff line
@@ -100,12 +100,15 @@ public:

    ANativeWindowBuffer* getNativeBuffer() const;

    void setIndex(int index);
    int getIndex() const;

    // for debugging
    static void dumpAllocationsToSystemLog();

    // Flattenable protocol
    size_t getFlattenedSize() const;
    size_t getFdCount() const;
    status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const;
    status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);

private:
    ~GraphicBuffer();

@@ -137,16 +140,8 @@ private:

    void free_handle();

    // Flattenable protocol
    size_t getFlattenedSize() const;
    size_t getFdCount() const;
    status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const;
    status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);


    GraphicBufferMapper& mBufferMapper;
    ssize_t mInitCheck;
    int mIndex;

    // If we're wrapping another buffer then this reference will make sure it
    // doesn't get freed.
+4 −14
Original line number Diff line number Diff line
@@ -36,8 +36,7 @@ namespace android {

GraphicBuffer::GraphicBuffer()
    : BASE(), mOwner(ownData), mBufferMapper(GraphicBufferMapper::get()),
      mInitCheck(NO_ERROR), mIndex(-1)
{
      mInitCheck(NO_ERROR) {
    width  = 
    height = 
    stride = 
@@ -49,7 +48,7 @@ GraphicBuffer::GraphicBuffer()
GraphicBuffer::GraphicBuffer(uint32_t w, uint32_t h, 
        PixelFormat reqFormat, uint32_t reqUsage)
    : BASE(), mOwner(ownData), mBufferMapper(GraphicBufferMapper::get()),
      mInitCheck(NO_ERROR), mIndex(-1)
      mInitCheck(NO_ERROR)
{
    width  = 
    height = 
@@ -65,7 +64,7 @@ GraphicBuffer::GraphicBuffer(uint32_t w, uint32_t h,
        uint32_t inStride, native_handle_t* inHandle, bool keepOwnership)
    : BASE(), mOwner(keepOwnership ? ownHandle : ownNone),
      mBufferMapper(GraphicBufferMapper::get()),
      mInitCheck(NO_ERROR), mIndex(-1)
      mInitCheck(NO_ERROR)
{
    width  = w;
    height = h;
@@ -78,7 +77,7 @@ GraphicBuffer::GraphicBuffer(uint32_t w, uint32_t h,
GraphicBuffer::GraphicBuffer(ANativeWindowBuffer* buffer, bool keepOwnership)
    : BASE(), mOwner(keepOwnership ? ownHandle : ownNone),
      mBufferMapper(GraphicBufferMapper::get()),
      mInitCheck(NO_ERROR), mIndex(-1), mWrappedBuffer(buffer)
      mInitCheck(NO_ERROR), mWrappedBuffer(buffer)
{
    width  = buffer->width;
    height = buffer->height;
@@ -297,15 +296,6 @@ status_t GraphicBuffer::unflatten(
    return NO_ERROR;
}


void GraphicBuffer::setIndex(int index) {
    mIndex = index;
}

int GraphicBuffer::getIndex() const {
    return mIndex;
}

// ---------------------------------------------------------------------------

}; // namespace android