blob: 553a537f04111a83873b4ada233a749cbb9e7e75 [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 {
22 /*
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
30 /*
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
40 /*
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,
47 };
48
Chia-I Wuacce6992016-09-20 06:52:43 +080049 /*
50 * Provides a list of supported capabilities (as described in the
51 * definition of Capability above). This list must not change after
52 * initialization.
53 *
54 * @return capabilities is a list of supported capabilities.
55 */
Chia-I Wub00f59d2017-01-13 14:47:23 +080056 @entry
57 @exit
58 @callflow(next="*")
Chia-I Wuacce6992016-09-20 06:52:43 +080059 getCapabilities() generates (vec<Capability> capabilities);
60
61 /*
62 * Retrieves implementation-defined debug information, which will be
63 * displayed during, for example, `dumpsys SurfaceFlinger`.
64 *
65 * @return debugInfo is a string of debug information.
66 */
Chia-I Wub00f59d2017-01-13 14:47:23 +080067 @entry
68 @exit
69 @callflow(next="*")
Chia-I Wuacce6992016-09-20 06:52:43 +080070 dumpDebugInfo() generates (string debugInfo);
71
72 /*
Chia-I Wubb61a722016-10-24 15:40:20 +080073 * Creates a client of the composer. All resources created by the client
74 * are owned by the client and are only visible to the client.
Chia-I Wuacce6992016-09-20 06:52:43 +080075 *
Chia-I Wubb61a722016-10-24 15:40:20 +080076 * There can only be one client at any time.
Chia-I Wuacce6992016-09-20 06:52:43 +080077 *
78 * @return error is NONE upon success. Otherwise,
Chia-I Wubb61a722016-10-24 15:40:20 +080079 * NO_RESOURCES when no more client can be created currently.
80 * @return client is the newly created client.
Chia-I Wuacce6992016-09-20 06:52:43 +080081 */
Chia-I Wub00f59d2017-01-13 14:47:23 +080082 @entry
83 @callflow(next="*")
Chia-I Wubb61a722016-10-24 15:40:20 +080084 createClient() generates (Error error, IComposerClient client);
Chia-I Wuacce6992016-09-20 06:52:43 +080085};