Skip to content

Commit

Permalink
add WITH_LCD_RGB888 in canvas offline
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Nov 29, 2023
1 parent 90839e8 commit 75a2f79
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/base/canvas_offline.inc
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,13 @@ typedef struct _canvas_offline_gpu_t {
#include "../lcd/lcd_mem_bgra8888.h"

#ifdef LINUX
#define WITH_LCD_RGB888 1
#endif/*LINUX*/

#ifdef WITH_LCD_RGB888
#include "../lcd/lcd_mem_rgb888.h"
#include "../lcd/lcd_mem_bgr888.h"
#endif
#endif/*WITH_LCD_RGB888*/

#endif

Expand Down Expand Up @@ -215,13 +219,14 @@ canvas_t* canvas_offline_create(uint32_t w, uint32_t h, bitmap_format_t format)
} else if (bitmap->format == BITMAP_FMT_RGB565) {
lcd = lcd_mem_rgb565_create_single_fb(bitmap->w, bitmap->h, buff);
}
#ifdef LINUX
#ifdef WITH_LCD_RGB888
else if (bitmap->format == BITMAP_FMT_RGB888) {
lcd = lcd_mem_rgb888_create_single_fb(bitmap->w, bitmap->h, buff);
} else if (bitmap->format == BITMAP_FMT_BGR888) {
lcd = lcd_mem_bgr888_create_single_fb(bitmap->w, bitmap->h, buff);
}
#endif
#endif /*WITH_LCD_RGB888*/

else {
assert(!" bitmap format not supported yet \n");
log_warn(" bitmap format not supported yet \n");
Expand Down

0 comments on commit 75a2f79

Please sign in to comment.