summaryrefslogtreecommitdiff
path: root/gralloc4/src/aidl/GrallocAllocator.h
blob: 82d465762fcc33a266efbc12887d0c8b6963840d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include <aidl/android/hardware/graphics/allocator/AllocationResult.h>
#include <aidl/android/hardware/graphics/allocator/BnAllocator.h>
#include <aidlcommonsupport/NativeHandle.h>

#include <cstdint>
#include <vector>

namespace pixel {
namespace allocator {

namespace AidlAllocator = aidl::android::hardware::graphics::allocator;

class GrallocAllocator : public AidlAllocator::BnAllocator {
public:
    GrallocAllocator();

    ~GrallocAllocator();

    virtual ndk::ScopedAStatus allocate(const std::vector<uint8_t>& descriptor, int32_t count,
                                        AidlAllocator::AllocationResult* result) override;
};

} // namespace allocator
} // namespace pixel