1
0
Fork 0
android_external_drm_hwcomp.../bufferinfo/BufferInfoMapperMetadata.h
Dennis Tsiang 3a5fb50648 drm_hwcomposer: implement Gralloc 4 BufferInfoMapperMetadata
Implements the BufferInfoMapperMetadata that uses the
GraphicBufferMapper to set the fields of the hwc_drm_bo_t struct.

New class function GetFds created to obtain the file descriptors from
the native_handle_t. Function is marked weak so that vendors can
override it to match their system if required.

Change-Id: I74445487dec6bda2915b21f4b63804832bfead23
Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
2020-11-02 08:25:13 +00:00

36 lines
1.1 KiB
C++

/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef PLATFORMIMAGINATION_H
#define PLATFORMIMAGINATION_H
#include "bufferinfo/BufferInfoGetter.h"
namespace android {
class BufferInfoMapperMetadata : public BufferInfoGetter {
public:
using BufferInfoGetter::BufferInfoGetter;
int ConvertBoInfo(buffer_handle_t handle, hwc_drm_bo_t *bo) override;
int GetFds(buffer_handle_t handle, hwc_drm_bo_t *bo);
static BufferInfoGetter *CreateInstance();
};
} // namespace android
#endif // PLATFORMIMAGINATION_H