Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 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.1; |
| 18 | |
Chia-I Wu | bb61a72 | 2016-10-24 15:40:20 +0800 | [diff] [blame] | 19 | import IComposerClient; |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 20 | |
| 21 | interface IComposer { |
Andreas Huber | 40d3a9b | 2017-03-28 16:19:16 -0700 | [diff] [blame] | 22 | /** |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 23 | * Optional capabilities which may be supported by some devices. The |
| 24 | * particular set of supported capabilities for a given device may be |
| 25 | * retrieved using getCapabilities. |
| 26 | */ |
| 27 | enum Capability : int32_t { |
| 28 | INVALID = 0, |
| 29 | |
Andreas Huber | 40d3a9b | 2017-03-28 16:19:16 -0700 | [diff] [blame] | 30 | /** |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 31 | * Specifies that the device supports sideband stream layers, for |
| 32 | * which buffer content updates and other synchronization will not be |
| 33 | * provided through the usual validate/present cycle and must be |
| 34 | * handled by an external implementation-defined mechanism. Only |
| 35 | * changes to layer state (such as position, size, etc.) need to be |
| 36 | * performed through the validate/present cycle. |
| 37 | */ |
| 38 | SIDEBAND_STREAM = 1, |
| 39 | |
Andreas Huber | 40d3a9b | 2017-03-28 16:19:16 -0700 | [diff] [blame] | 40 | /** |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 41 | * Specifies that the device will apply a color transform even when |
| 42 | * either the client or the device has chosen that all layers should |
| 43 | * be composed by the client. This will prevent the client from |
| 44 | * applying the color transform during its composition step. |
| 45 | */ |
| 46 | SKIP_CLIENT_COLOR_TRANSFORM = 2, |
Brian Anderson | 9af5d94 | 2017-04-04 16:16:41 -0700 | [diff] [blame] | 47 | |
| 48 | /** |
| 49 | * Specifies that the present fence must not be used as an accurate |
| 50 | * representation of the actual present time of a frame. |
| 51 | */ |
| 52 | PRESENT_FENCE_IS_NOT_RELIABLE = 3, |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 53 | }; |
| 54 | |
Andreas Huber | 40d3a9b | 2017-03-28 16:19:16 -0700 | [diff] [blame] | 55 | /** |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 56 | * Provides a list of supported capabilities (as described in the |
| 57 | * definition of Capability above). This list must not change after |
| 58 | * initialization. |
| 59 | * |
| 60 | * @return capabilities is a list of supported capabilities. |
| 61 | */ |
Chia-I Wu | b00f59d | 2017-01-13 14:47:23 +0800 | [diff] [blame] | 62 | @entry |
| 63 | @exit |
| 64 | @callflow(next="*") |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 65 | getCapabilities() generates (vec<Capability> capabilities); |
| 66 | |
Andreas Huber | 40d3a9b | 2017-03-28 16:19:16 -0700 | [diff] [blame] | 67 | /** |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 68 | * Retrieves implementation-defined debug information, which will be |
| 69 | * displayed during, for example, `dumpsys SurfaceFlinger`. |
| 70 | * |
| 71 | * @return debugInfo is a string of debug information. |
| 72 | */ |
Chia-I Wu | b00f59d | 2017-01-13 14:47:23 +0800 | [diff] [blame] | 73 | @entry |
| 74 | @exit |
| 75 | @callflow(next="*") |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 76 | dumpDebugInfo() generates (string debugInfo); |
| 77 | |
Andreas Huber | 40d3a9b | 2017-03-28 16:19:16 -0700 | [diff] [blame] | 78 | /** |
Chia-I Wu | bb61a72 | 2016-10-24 15:40:20 +0800 | [diff] [blame] | 79 | * Creates a client of the composer. All resources created by the client |
| 80 | * are owned by the client and are only visible to the client. |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 81 | * |
Chia-I Wu | bb61a72 | 2016-10-24 15:40:20 +0800 | [diff] [blame] | 82 | * There can only be one client at any time. |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 83 | * |
| 84 | * @return error is NONE upon success. Otherwise, |
Chia-I Wu | bb61a72 | 2016-10-24 15:40:20 +0800 | [diff] [blame] | 85 | * NO_RESOURCES when no more client can be created currently. |
| 86 | * @return client is the newly created client. |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 87 | */ |
Chia-I Wu | b00f59d | 2017-01-13 14:47:23 +0800 | [diff] [blame] | 88 | @entry |
| 89 | @callflow(next="*") |
Chia-I Wu | bb61a72 | 2016-10-24 15:40:20 +0800 | [diff] [blame] | 90 | createClient() generates (Error error, IComposerClient client); |
Chia-I Wu | acce699 | 2016-09-20 06:52:43 +0800 | [diff] [blame] | 91 | }; |