| Mathias Agopian | cbb288b | 2009-09-07 16:32:45 -0700 | [diff] [blame] | 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 |  | 
| Mathias Agopian | 9cce325 | 2010-02-09 17:46:37 -0800 | [diff] [blame] | 17 | #ifndef ANDROID_SF_SHARED_BUFFER_STACK_H | 
 | 18 | #define ANDROID_SF_SHARED_BUFFER_STACK_H | 
| Mathias Agopian | cbb288b | 2009-09-07 16:32:45 -0700 | [diff] [blame] | 19 |  | 
 | 20 | #include <stdint.h> | 
 | 21 | #include <sys/types.h> | 
 | 22 |  | 
| Mathias Agopian | cbb288b | 2009-09-07 16:32:45 -0700 | [diff] [blame] | 23 | #include <utils/Debug.h> | 
| Mathias Agopian | cbb288b | 2009-09-07 16:32:45 -0700 | [diff] [blame] | 24 |  | 
 | 25 | namespace android { | 
 | 26 | // --------------------------------------------------------------------------- | 
 | 27 |  | 
| Mathias Agopian | a67932f | 2011-04-20 14:20:59 -0700 | [diff] [blame] | 28 | #define NUM_DISPLAY_MAX 4 | 
| Mathias Agopian | cbb288b | 2009-09-07 16:32:45 -0700 | [diff] [blame] | 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]; | 
| Mathias Agopian | a67932f | 2011-04-20 14:20:59 -0700 | [diff] [blame] | 49 |     display_cblk_t  displays[NUM_DISPLAY_MAX]; | 
| Mathias Agopian | cbb288b | 2009-09-07 16:32:45 -0700 | [diff] [blame] | 50 | }; | 
 | 51 |  | 
 | 52 | // --------------------------------------------------------------------------- | 
 | 53 |  | 
| Mathias Agopian | cbb288b | 2009-09-07 16:32:45 -0700 | [diff] [blame] | 54 | COMPILE_TIME_ASSERT(sizeof(surface_flinger_cblk_t) <= 4096) | 
 | 55 |  | 
 | 56 | // --------------------------------------------------------------------------- | 
 | 57 | }; // namespace android | 
 | 58 |  | 
| Mathias Agopian | 9cce325 | 2010-02-09 17:46:37 -0800 | [diff] [blame] | 59 | #endif /* ANDROID_SF_SHARED_BUFFER_STACK_H */ |