• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef __BO_H_INCLUDED__
2 #define __BO_H_INCLUDED__
3 
4 #include <stdint.h>
5 
6 struct sp_dev;
7 
8 struct sp_bo {
9 	struct sp_dev *dev;
10 
11 	uint32_t width;
12 	uint32_t height;
13 	uint32_t depth;
14 	uint32_t bpp;
15 	uint32_t format;
16 	uint32_t flags;
17 
18 	uint32_t fb_id;
19 	uint32_t handle;
20 	void *map_addr;
21 	uint32_t pitch;
22 	uint32_t size;
23 };
24 
25 struct sp_bo *create_sp_bo(struct sp_dev *dev, uint32_t width, uint32_t height,
26 		uint32_t depth, uint32_t format, uint32_t flags);
27 
28 void fill_bo(struct sp_bo *bo, uint8_t a, uint8_t r, uint8_t g, uint8_t b);
29 void draw_rect(struct sp_bo *bo, uint32_t x, uint32_t y, uint32_t width,
30 		uint32_t height, uint8_t a, uint8_t r, uint8_t g, uint8_t b);
31 
32 void free_sp_bo(struct sp_bo *bo);
33 
34 #endif /* __BO_H_INCLUDED__ */
35