Peiyong Lin | 781d0bb | 2019-07-03 10:57:02 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019 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 | package android.hardware.graphics.composer@2.4; |
| 18 | |
| 19 | import @2.1::Display; |
| 20 | import @2.1::Error; |
| 21 | import @2.3::IComposerClient; |
| 22 | |
| 23 | interface IComposerClient extends @2.3::IComposerClient { |
Peiyong Lin | 781d0bb | 2019-07-03 10:57:02 -0700 | [diff] [blame] | 24 | /** |
| 25 | * Required capabilities which are supported by the display. The |
| 26 | * particular set of supported capabilities for a given display may be |
| 27 | * retrieved using getDisplayCapabilities. |
| 28 | */ |
Dominik Laskowski | ce44a4b | 2019-09-19 15:50:09 -0700 | [diff] [blame] | 29 | enum DisplayCapability : @2.3::IComposerClient.DisplayCapability { |
Peiyong Lin | 781d0bb | 2019-07-03 10:57:02 -0700 | [diff] [blame] | 30 | /** |
| 31 | * Indicates that the display supports protected contents. |
| 32 | * When returned, hardware composer must be able to accept client target |
| 33 | * with protected buffers. |
| 34 | */ |
| 35 | PROTECTED_CONTENTS = 4, |
| 36 | }; |
| 37 | |
| 38 | /** |
Dominik Laskowski | ce44a4b | 2019-09-19 15:50:09 -0700 | [diff] [blame] | 39 | * Supersedes {@link @2.1::IComposerClient.DisplayType}. |
| 40 | */ |
| 41 | enum DisplayConnectionType : uint32_t { |
| 42 | /** |
| 43 | * Display is connected through internal port, e.g. DSI, eDP. |
| 44 | */ |
| 45 | INTERNAL = 0, |
| 46 | /** |
| 47 | * Display is connected through external port, e.g. HDMI, DisplayPort. |
| 48 | */ |
| 49 | EXTERNAL = 1, |
| 50 | }; |
| 51 | |
| 52 | /** |
Peiyong Lin | 781d0bb | 2019-07-03 10:57:02 -0700 | [diff] [blame] | 53 | * Provides a list of supported capabilities (as described in the |
| 54 | * definition of DisplayCapability above). This list must not change after |
| 55 | * initialization. |
| 56 | * |
| 57 | * @return error is NONE upon success. Otherwise, |
| 58 | * BAD_DISPLAY when an invalid display handle was passed in. |
| 59 | * @return capabilities is a list of supported capabilities. |
| 60 | */ |
| 61 | getDisplayCapabilities_2_4(Display display) |
Dominik Laskowski | ce44a4b | 2019-09-19 15:50:09 -0700 | [diff] [blame] | 62 | generates (Error error, vec<DisplayCapability> capabilities); |
| 63 | |
| 64 | /** |
| 65 | * Returns whether the given physical display is internal or external. |
| 66 | * |
| 67 | * @return error is NONE upon success. Otherwise, |
| 68 | * BAD_DISPLAY when the given display is invalid or virtual. |
| 69 | * @return type is the connection type of the display. |
| 70 | */ |
| 71 | getDisplayConnectionType(Display display) generates (Error error, DisplayConnectionType type); |
Peiyong Lin | 781d0bb | 2019-07-03 10:57:02 -0700 | [diff] [blame] | 72 | }; |