#pragma once #include #include #include #include #include #include #include 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& descriptor, int32_t count, AidlAllocator::AllocationResult* result) override; virtual ndk::ScopedAStatus allocate2(const AidlAllocator::BufferDescriptorInfo& descriptor, int32_t count, AidlAllocator::AllocationResult* result) override; virtual ndk::ScopedAStatus isSupported(const AidlAllocator::BufferDescriptorInfo& descriptor, bool* result) override; virtual ndk::ScopedAStatus getIMapperLibrarySuffix(std::string* result) override; virtual binder_status_t dump(int fd, const char** args, uint32_t numArgs) override; }; } // namespace allocator } // namespace pixel