forked from wzyy2/rga-v4l2-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbo.h
52 lines (42 loc) · 1.42 KB
/
bo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* Copyright 2016 Rockchip Electronics S.LSI Co. LTD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __BO_H_INCLUDED__
#define __BO_H_INCLUDED__
#include <stdint.h>
#undef USE_ATOMIC_API
struct sp_dev;
struct sp_bo {
struct sp_dev *dev;
uint32_t width;
uint32_t height;
uint32_t depth;
uint32_t bpp;
uint32_t format;
uint32_t flags;
uint32_t fb_id;
uint32_t handle;
void *map_addr;
uint32_t pitch;
uint32_t size;
};
int add_fb_sp_bo(struct sp_bo *bo, uint32_t format);
struct sp_bo* create_sp_bo(struct sp_dev *dev, uint32_t width, uint32_t height,
uint32_t depth, uint32_t bpp, uint32_t format, uint32_t flags);
void fill_bo(struct sp_bo *bo, uint8_t a, uint8_t r, uint8_t g, uint8_t b);
void draw_rect(struct sp_bo *bo, uint32_t x, uint32_t y, uint32_t width,
uint32_t height, uint8_t a, uint8_t r, uint8_t g, uint8_t b);
void free_sp_bo(struct sp_bo *bo);
#endif /* __BO_H_INCLUDED__ */