blob: 771fc7d92d223283d23e6b85164e2d0412636c33 [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 */
56 getCapabilities() generates (vec<Capability> capabilities);
57
58 /*
59 * Retrieves implementation-defined debug information, which will be
60 * displayed during, for example, `dumpsys SurfaceFlinger`.
61 *
62 * @return debugInfo is a string of debug information.
63 */
64 dumpDebugInfo() generates (string debugInfo);
65
66 /*
Chia-I Wubb61a722016-10-24 15:40:20 +080067 * Creates a client of the composer. All resources created by the client
68 * are owned by the client and are only visible to the client.
Chia-I Wuacce6992016-09-20 06:52:43 +080069 *
Chia-I Wubb61a722016-10-24 15:40:20 +080070 * There can only be one client at any time.
Chia-I Wuacce6992016-09-20 06:52:43 +080071 *
72 * @return error is NONE upon success. Otherwise,
Chia-I Wubb61a722016-10-24 15:40:20 +080073 * NO_RESOURCES when no more client can be created currently.
74 * @return client is the newly created client.
Chia-I Wuacce6992016-09-20 06:52:43 +080075 */
Chia-I Wubb61a722016-10-24 15:40:20 +080076 createClient() generates (Error error, IComposerClient client);
Chia-I Wuacce6992016-09-20 06:52:43 +080077};