blob: 27258023fe6834243fab5e2ad46d6c0e59dd6f6b [file] [log] [blame]
Roman Stratiienkob2e9fe22020-10-03 10:52:36 +03001/*
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
17#if PLATFORM_SDK_VERSION >= 30
18
19#define LOG_TAG "hwc-bufferinfo-mappermetadata"
20
21#include "BufferInfoMapperMetadata.h"
22
23#include <drm/drm_fourcc.h>
24#include <inttypes.h>
25#include <log/log.h>
26#include <ui/GraphicBufferMapper.h>
27#include <xf86drm.h>
28#include <xf86drmMode.h>
29
30using android::hardware::graphics::common::V1_1::BufferUsage;
31
32namespace android {
33
34BufferInfoGetter *BufferInfoMapperMetadata::CreateInstance() {
35 if (GraphicBufferMapper::getInstance().getMapperVersion() <
36 GraphicBufferMapper::GRALLOC_4)
37 return nullptr;
38
39 return new BufferInfoMapperMetadata();
40}
41
42int BufferInfoMapperMetadata::ConvertBoInfo(buffer_handle_t /*handle*/,
43 hwc_drm_bo_t * /*bo*/) {
44 return -EINVAL;
45}
46
47} // namespace android
48
49#endif