1 #pragma once 2 3 #include <aidl/android/hardware/graphics/allocator/AllocationResult.h> 4 #include <aidl/android/hardware/graphics/allocator/BnAllocator.h> 5 #include <aidlcommonsupport/NativeHandle.h> 6 7 #include <cstdint> 8 #include <vector> 9 10 namespace pixel { 11 namespace allocator { 12 13 namespace AidlAllocator = aidl::android::hardware::graphics::allocator; 14 15 class GrallocAllocator : public AidlAllocator::BnAllocator { 16 public: 17 GrallocAllocator(); 18 19 ~GrallocAllocator(); 20 21 virtual ndk::ScopedAStatus allocate(const std::vector<uint8_t>& descriptor, int32_t count, 22 AidlAllocator::AllocationResult* result) override; 23 }; 24 25 } // namespace allocator 26 } // namespace pixel 27