zlgopen / awtk-linux-fb

awtk port for linux framebuffer
108 stars 49 forks source link

awtk-linux-fb如何支持ARGB8888 #42

Open liliao007 opened 4 years ago

liliao007 commented 4 years ago

修改以下部分代码还是无法支持ARGB8888:

diff --git a/src/lcd/gen.sh b/src/lcd/gen.sh index 1653746..24f7867 100755 --- a/src/lcd/gen.sh +++ b/src/lcd/gen.sh @@ -12,11 +12,11 @@ function gen() { }

if [ "$1" == "" ]; then

diff --git a/src/blend/gen.sh b/src/blend/gen.sh index d6a5494..dcc1b08 100755 --- a/src/blend/gen.sh +++ b/src/blend/gen.sh @@ -27,7 +27,7 @@ function gen_rotate_fill() {

supported formats: rgb565 bgr565 rgb888 bgr888 rgba8888 abgr8888 bgra8888 argb8888

if [ "$1" == "" ]; then

diff --git a/awtk-port/fb_info.h b/awtk-port/fb_info.h index deaf62d..5553881 100755 --- a/awtk-port/fb_info.h +++ b/awtk-port/fb_info.h @@ -116,6 +116,18 @@ static inline bool_t fb_is_rgba8888(fb_info_t* fb) { } }

+static inline bool_t fb_is_argb8888(fb_info_t* fb) {

xianjimli commented 4 years ago

参考这个:https://github.com/zlgopen/awtk-linux-fb/blob/master/awtk-port/lcd_mem_others.c

offline framebuffer用rgba8888,在flush函数中转换成argb8888即可。