• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef DISPLAY_GRALLOC_INTERNAL_H
17 #define DISPLAY_GRALLOC_INTERNAL_H
18 #include "display_type.h"
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 #define GRALLOC_PRIV_NUM_FDS 0
23 #define GRALLOC_PRIV_NUM_INTS ((sizeof(PriBufferHandle) - sizeof(BufferHandle)) / sizeof(int) - GRALLOC_PRIV_NUM_FDS)
24 
25 #define INVALID_PIXEL_FMT 0
26 #define MAX_PLANES 3
27 
28 typedef struct plane_info {
29     uint32_t offset;
30     uint32_t byte_stride;
31     uint32_t alloc_width;
32     uint32_t alloc_height;
33 }plane_info_t;
34 
35 typedef struct {
36     BufferHandle hdl;
37     int yuv_info;
38     int plan_num;
39     plane_info_t plane_info[MAX_PLANES];
40     uint64_t id;
41 } PriBufferHandle;
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 
47 #endif