Home | History | Annotate | Download | only in gui
      1 /*
      2  * Copyright (C) 2007 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 #ifndef ANDROID_SF_SHARED_BUFFER_STACK_H
     18 #define ANDROID_SF_SHARED_BUFFER_STACK_H
     19 
     20 #include <stdint.h>
     21 #include <sys/types.h>
     22 
     23 #include <utils/Debug.h>
     24 
     25 namespace android {
     26 // ---------------------------------------------------------------------------
     27 
     28 #define NUM_DISPLAY_MAX 4
     29 
     30 struct display_cblk_t
     31 {
     32     uint16_t    w;
     33     uint16_t    h;
     34     uint8_t     format;
     35     uint8_t     orientation;
     36     uint8_t     reserved[2];
     37     float       fps;
     38     float       density;
     39     float       xdpi;
     40     float       ydpi;
     41     uint32_t    pad[2];
     42 };
     43 
     44 struct surface_flinger_cblk_t   // 4KB max
     45 {
     46     uint8_t         connected;
     47     uint8_t         reserved[3];
     48     uint32_t        pad[7];
     49     display_cblk_t  displays[NUM_DISPLAY_MAX];
     50 };
     51 
     52 // ---------------------------------------------------------------------------
     53 
     54 COMPILE_TIME_ASSERT(sizeof(surface_flinger_cblk_t) <= 4096)
     55 
     56 // ---------------------------------------------------------------------------
     57 }; // namespace android
     58 
     59 #endif /* ANDROID_SF_SHARED_BUFFER_STACK_H */
     60