blob: 0da03d1343c70baa00463420ce20e4e0434e6266 [file] [log] [blame]
Mathias Agopian81e2a522009-09-07 16:32:45 -07001/*
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 Agopian3cf61352010-02-09 17:46:37 -080017#ifndef ANDROID_SF_SHARED_BUFFER_STACK_H
18#define ANDROID_SF_SHARED_BUFFER_STACK_H
Mathias Agopian81e2a522009-09-07 16:32:45 -070019
20#include <stdint.h>
21#include <sys/types.h>
22
Mathias Agopian81e2a522009-09-07 16:32:45 -070023#include <utils/Debug.h>
Mathias Agopian81e2a522009-09-07 16:32:45 -070024
25namespace android {
26// ---------------------------------------------------------------------------
27
Mathias Agopian4b85d172011-04-20 14:20:59 -070028#define NUM_DISPLAY_MAX 4
Mathias Agopian81e2a522009-09-07 16:32:45 -070029
30struct 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
44struct surface_flinger_cblk_t // 4KB max
45{
46 uint8_t connected;
47 uint8_t reserved[3];
48 uint32_t pad[7];
Mathias Agopian4b85d172011-04-20 14:20:59 -070049 display_cblk_t displays[NUM_DISPLAY_MAX];
Mathias Agopian81e2a522009-09-07 16:32:45 -070050};
51
52// ---------------------------------------------------------------------------
53
Mathias Agopian81e2a522009-09-07 16:32:45 -070054COMPILE_TIME_ASSERT(sizeof(surface_flinger_cblk_t) <= 4096)
55
56// ---------------------------------------------------------------------------
57}; // namespace android
58
Mathias Agopian3cf61352010-02-09 17:46:37 -080059#endif /* ANDROID_SF_SHARED_BUFFER_STACK_H */