Marin Shalamanov | f6b5d18 | 2020-06-12 02:08:51 +0200 | [diff] [blame] | 1 | /* |
| 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 | |
| 24 | namespace android { |
| 25 | |
| 26 | class DisplayDevice; |
| 27 | |
| 28 | class DisplayRenderArea : public RenderArea { |
| 29 | public: |
| 30 | static std::unique_ptr<RenderArea> create(wp<const DisplayDevice>, const Rect& sourceCrop, |
| 31 | ui::Size reqSize, ui::Dataspace, |
Vishnu Nair | 871886e | 2024-06-26 17:17:51 -0700 | [diff] [blame] | 32 | ftl::Flags<Options> options); |
Marin Shalamanov | f6b5d18 | 2020-06-12 02:08:51 +0200 | [diff] [blame] | 33 | |
| 34 | const ui::Transform& getTransform() const override; |
Marin Shalamanov | f6b5d18 | 2020-06-12 02:08:51 +0200 | [diff] [blame] | 35 | bool isSecure() const override; |
| 36 | sp<const DisplayDevice> getDisplayDevice() const override; |
Marin Shalamanov | f6b5d18 | 2020-06-12 02:08:51 +0200 | [diff] [blame] | 37 | Rect getSourceCrop() const override; |
| 38 | |
| 39 | private: |
| 40 | DisplayRenderArea(sp<const DisplayDevice>, const Rect& sourceCrop, ui::Size reqSize, |
Vishnu Nair | 871886e | 2024-06-26 17:17:51 -0700 | [diff] [blame] | 41 | ui::Dataspace, ftl::Flags<Options> options); |
Marin Shalamanov | f6b5d18 | 2020-06-12 02:08:51 +0200 | [diff] [blame] | 42 | |
| 43 | const sp<const DisplayDevice> mDisplay; |
| 44 | const Rect mSourceCrop; |
Marin Shalamanov | f6b5d18 | 2020-06-12 02:08:51 +0200 | [diff] [blame] | 45 | const ui::Transform mTransform; |
| 46 | }; |
| 47 | |
Patrick Williams | 278a88f | 2023-01-27 16:52:40 -0600 | [diff] [blame] | 48 | } // namespace android |