From cfa2141a88a135968db9db517493e7b0ae7ab722 Mon Sep 17 00:00:00 2001 From: Pablo Castellano Date: Mon, 17 Jul 2017 19:55:45 +0200 Subject: [PATCH 2/3] compositor-fbdev: Add support for ABGR This is needed for Asus grouper (Google Nexus 7 2012) https://wiki.postmarketos.org/wiki/Google_Nexus_7_2012_(asus-grouper) --- libweston/compositor-fbdev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c index b7d2c74..8158841 100644 --- a/libweston/compositor-fbdev.c +++ b/libweston/compositor-fbdev.c @@ -223,8 +223,8 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo, vinfo->blue.length); } - /* Work out the format type from the offsets. We only support RGBA and - * ARGB at the moment. */ + /* Work out the format type from the offsets. We only support RGBA, + * ARGB and ABGR at the moment. */ type = PIXMAN_TYPE_OTHER; if ((vinfo->transp.offset >= vinfo->red.offset || @@ -236,6 +236,10 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo, vinfo->green.offset >= vinfo->blue.offset && vinfo->blue.offset >= vinfo->transp.offset) type = PIXMAN_TYPE_RGBA; + else if (vinfo->transp.offset >= vinfo->blue.offset && + vinfo->blue.offset >= vinfo->green.offset && + vinfo->green.offset >= vinfo->red.offset) + type = PIXMAN_TYPE_ABGR; if (type == PIXMAN_TYPE_OTHER) return 0; -- 2.7.4