blob: 5b05325cadba0924a829106c5ac6a3c0e201c867 [file] [log] [blame]
Mattijs Korpershoek5284c7e2020-09-21 11:03:35 +00001/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Roman Stratiienkobde95662022-12-10 20:27:58 +020017#pragma once
Mattijs Korpershoek5284c7e2020-09-21 11:03:35 +000018
Roman Stratiienkob2e9fe22020-10-03 10:52:36 +030019#include "bufferinfo/BufferInfoGetter.h"
Mattijs Korpershoek5284c7e2020-09-21 11:03:35 +000020
21namespace android {
22
Roman Stratiienkob2e9fe22020-10-03 10:52:36 +030023class BufferInfoMapperMetadata : public BufferInfoGetter {
Mattijs Korpershoek5284c7e2020-09-21 11:03:35 +000024 public:
Roman Stratiienkob2e9fe22020-10-03 10:52:36 +030025 using BufferInfoGetter::BufferInfoGetter;
Mattijs Korpershoek5284c7e2020-09-21 11:03:35 +000026
Roman Stratiienkoe9fbd8d2022-02-21 13:03:29 +020027 auto GetBoInfo(buffer_handle_t handle) -> std::optional<BufferInfo> override;
Roman Stratiienkob2e9fe22020-10-03 10:52:36 +030028
Roman Stratiienko2a93e4c2022-12-19 18:24:47 +020029 static int GetFds(buffer_handle_t handle, BufferInfo *bo);
Dennis Tsiang3a5fb502020-10-30 08:43:33 +000030
Roman Stratiienkob2e9fe22020-10-03 10:52:36 +030031 static BufferInfoGetter *CreateInstance();
Mattijs Korpershoek5284c7e2020-09-21 11:03:35 +000032};
33} // namespace android