blob: e2aa5cd2343d48a84179c670f97e09282829af5d [file] [log] [blame]
Chia-I Wuacce6992016-09-20 06:52:43 +08001/*
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
17package android.hardware.graphics.composer@2.1;
18
Chia-I Wubb61a722016-10-24 15:40:20 +080019import IComposerClient;
Chia-I Wuacce6992016-09-20 06:52:43 +080020
21interface IComposer {
Andreas Huber40d3a9b2017-03-28 16:19:16 -070022 /**
Chia-I Wuacce6992016-09-20 06:52:43 +080023 * 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 Huber40d3a9b2017-03-28 16:19:16 -070030 /**
Chia-I Wuacce6992016-09-20 06:52:43 +080031 * 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 Huber40d3a9b2017-03-28 16:19:16 -070040 /**
Chia-I Wuacce6992016-09-20 06:52:43 +080041 * 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 Anderson9af5d942017-04-04 16:16:41 -070047
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 Wuacce6992016-09-20 06:52:43 +080053 };
54
Andreas Huber40d3a9b2017-03-28 16:19:16 -070055 /**
Chia-I Wuacce6992016-09-20 06:52:43 +080056 * 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 Wub00f59d2017-01-13 14:47:23 +080062 @entry
63 @exit
64 @callflow(next="*")
Chia-I Wuacce6992016-09-20 06:52:43 +080065 getCapabilities() generates (vec<Capability> capabilities);
66
Andreas Huber40d3a9b2017-03-28 16:19:16 -070067 /**
Chia-I Wuacce6992016-09-20 06:52:43 +080068 * 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 Wub00f59d2017-01-13 14:47:23 +080073 @entry
74 @exit
75 @callflow(next="*")
Chia-I Wuacce6992016-09-20 06:52:43 +080076 dumpDebugInfo() generates (string debugInfo);
77
Andreas Huber40d3a9b2017-03-28 16:19:16 -070078 /**
Chia-I Wubb61a722016-10-24 15:40:20 +080079 * 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 Wuacce6992016-09-20 06:52:43 +080081 *
Chia-I Wubb61a722016-10-24 15:40:20 +080082 * There can only be one client at any time.
Chia-I Wuacce6992016-09-20 06:52:43 +080083 *
84 * @return error is NONE upon success. Otherwise,
Chia-I Wubb61a722016-10-24 15:40:20 +080085 * NO_RESOURCES when no more client can be created currently.
86 * @return client is the newly created client.
Chia-I Wuacce6992016-09-20 06:52:43 +080087 */
Chia-I Wub00f59d2017-01-13 14:47:23 +080088 @entry
89 @callflow(next="*")
Chia-I Wubb61a722016-10-24 15:40:20 +080090 createClient() generates (Error error, IComposerClient client);
Chia-I Wuacce6992016-09-20 06:52:43 +080091};