2 * Copyright 2020 The Chromium OS Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
7 #include <android/hardware/graphics/allocator/4.0/IAllocator.h>
8 #include <android/hardware/graphics/mapper/4.0/IMapper.h>
10 #include "cros_gralloc/cros_gralloc_driver.h"
12 class CrosGralloc4Allocator : public android::hardware::graphics::allocator::V4_0::IAllocator {
14 CrosGralloc4Allocator();
16 android::hardware::Return<void> allocate(const android::hardware::hidl_vec<uint8_t>& descriptor,
17 uint32_t count, allocate_cb hidl_cb) override;
20 android::hardware::graphics::mapper::V4_0::Error allocate(
21 const android::hardware::graphics::mapper::V4_0::IMapper::BufferDescriptorInfo&
23 uint32_t* outStride, android::hardware::hidl_handle* outHandle);
25 std::unique_ptr<cros_gralloc_driver> mDriver;