blob: 9a4981c881f9c32308e6f2a26bb7c7fb919bd0b8 [file] [log] [blame]
Marin Shalamanovf6b5d182020-06-12 02:08:51 +02001/*
2 * Copyright 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#pragma once
18
19#include <ui/GraphicTypes.h>
20#include <ui/Transform.h>
21
22#include "RenderArea.h"
23
24namespace android {
25
26class DisplayDevice;
27
28class DisplayRenderArea : public RenderArea {
29public:
30 static std::unique_ptr<RenderArea> create(wp<const DisplayDevice>, const Rect& sourceCrop,
31 ui::Size reqSize, ui::Dataspace,
chaviwc6ad8af2020-08-03 11:33:30 -070032 bool useIdentityTransform,
Alec Mouri3e5965f2023-04-07 18:00:58 +000033 bool hintForSeamlessTransition,
Marin Shalamanovf6b5d182020-06-12 02:08:51 +020034 bool allowSecureLayers = true);
35
36 const ui::Transform& getTransform() const override;
Marin Shalamanovf6b5d182020-06-12 02:08:51 +020037 bool isSecure() const override;
38 sp<const DisplayDevice> getDisplayDevice() const override;
Marin Shalamanovf6b5d182020-06-12 02:08:51 +020039 Rect getSourceCrop() const override;
40
41private:
42 DisplayRenderArea(sp<const DisplayDevice>, const Rect& sourceCrop, ui::Size reqSize,
Alec Mouri3e5965f2023-04-07 18:00:58 +000043 ui::Dataspace, bool useIdentityTransform, bool hintForSeamlessTransition,
44 bool allowSecureLayers = true);
Marin Shalamanovf6b5d182020-06-12 02:08:51 +020045
46 const sp<const DisplayDevice> mDisplay;
47 const Rect mSourceCrop;
Marin Shalamanovf6b5d182020-06-12 02:08:51 +020048 const ui::Transform mTransform;
49};
50
Patrick Williams278a88f2023-01-27 16:52:40 -060051} // namespace android