Home | History | Annotate | Download | only in 2.1
      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 
     19 import IComposerClient;
     20 
     21 interface 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         /**
     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,
     53     };
     54 
     55     /**
     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      */
     62     @entry
     63     @exit
     64     @callflow(next="*")
     65     getCapabilities() generates (vec<Capability> capabilities);
     66 
     67     /**
     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      */
     73     @entry
     74     @exit
     75     @callflow(next="*")
     76     dumpDebugInfo() generates (string debugInfo);
     77 
     78     /**
     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.
     81      *
     82      * There can only be one client at any time.
     83      *
     84      * @return error is NONE upon success. Otherwise,
     85      *         NO_RESOURCES when no more client can be created currently.
     86      * @return client is the newly created client.
     87      */
     88     @entry
     89     @callflow(next="*")
     90     createClient() generates (Error error, IComposerClient client);
     91 };
     92