blob: 054cd93209259312cc9739c193fd2e06703e907a [file] [log] [blame]
Roman Stratiienko9362cef2022-02-02 09:53:50 +02001/*
2 * Copyright (C) 2022 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
Roman Stratiienko9362cef2022-02-02 09:53:50 +020018
19#include <memory>
20#include <vector>
21
Roman Stratiienko4b2cc482022-02-21 14:53:58 +020022#include "LayerData.h"
Roman Stratiienko9362cef2022-02-02 09:53:50 +020023
24namespace android {
25
26class DrmDevice;
27
28struct DrmKmsPlan {
29 struct LayerToPlaneJoining {
Roman Stratiienko4b2cc482022-02-21 14:53:58 +020030 LayerData layer;
Roman Stratiienko9362cef2022-02-02 09:53:50 +020031 std::shared_ptr<BindingOwner<DrmPlane>> plane;
32 int z_pos;
33 };
34
35 std::vector<LayerToPlaneJoining> plan;
36
37 static auto CreateDrmKmsPlan(DrmDisplayPipeline &pipe,
Roman Stratiienko4b2cc482022-02-21 14:53:58 +020038 std::vector<LayerData> composition)
Roman Stratiienko9362cef2022-02-02 09:53:50 +020039 -> std::unique_ptr<DrmKmsPlan>;
40};
41
42} // namespace android