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

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

Merge "gralloc: support codec2 via GraphicBufferAllocator/Mapper"

parents 27936a63 67514c24
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -111,11 +111,10 @@ void GraphicBufferAllocator::dumpToSystemLog()
    ALOGD("%s", s.c_str());
}

status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height,
        PixelFormat format, uint32_t layerCount, uint64_t usage,
status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height, PixelFormat format,
                                          uint32_t layerCount, uint64_t usage,
                                          buffer_handle_t* handle, uint32_t* stride,
        uint64_t /*graphicBufferId*/, std::string requestorName)
{
                                          std::string requestorName) {
    ATRACE_CALL();

    // make sure to not allocate a N x 0 or 0 x N buffer, since this is
@@ -175,6 +174,13 @@ status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height,
    }
}

status_t GraphicBufferAllocator::allocate(uint32_t width, uint32_t height, PixelFormat format,
                                          uint32_t layerCount, uint64_t usage,
                                          buffer_handle_t* handle, uint32_t* stride,
                                          uint64_t /*graphicBufferId*/, std::string requestorName) {
    return allocate(width, height, format, layerCount, usage, handle, stride, requestorName);
}

status_t GraphicBufferAllocator::free(buffer_handle_t handle)
{
    ATRACE_CALL();
+5 −0
Original line number Diff line number Diff line
@@ -42,11 +42,16 @@ class GraphicBufferAllocator : public Singleton<GraphicBufferAllocator>
public:
    static inline GraphicBufferAllocator& get() { return getInstance(); }

    // DEPRECATED: GraphicBufferAllocator does not use the graphicBufferId
    status_t allocate(uint32_t w, uint32_t h, PixelFormat format,
            uint32_t layerCount, uint64_t usage,
            buffer_handle_t* handle, uint32_t* stride, uint64_t graphicBufferId,
            std::string requestorName);

    status_t allocate(uint32_t w, uint32_t h, PixelFormat format, uint32_t layerCount,
                      uint64_t usage, buffer_handle_t* handle, uint32_t* stride,
                      std::string requestorName);

    status_t free(buffer_handle_t handle);

    size_t getTotalSize() const;
+1 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <memory>

#include <ui/PixelFormat.h>
#include <ui/Rect.h>
#include <utils/Singleton.h>


@@ -36,7 +37,6 @@ namespace android {
// ---------------------------------------------------------------------------

class GrallocMapper;
class Rect;

class GraphicBufferMapper : public Singleton<GraphicBufferMapper>
{