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