2017-07-17 18:11:23 +00:00
|
|
|
From cfa2141a88a135968db9db517493e7b0ae7ab722 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Pablo Castellano <pablo@anche.no>
|
|
|
|
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)
|
2017-09-03 06:46:54 +00:00
|
|
|
https://wiki.postmarketos.org/wiki/Google_Nexus_7_2012_(asus-grouper)
|
2017-07-17 18:11:23 +00:00
|
|
|
---
|
|
|
|
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);
|
|
|
|
}
|
2017-09-04 17:02:09 +00:00
|
|
|
|
2017-07-17 18:11:23 +00:00
|
|
|
- /* 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;
|
2017-09-03 06:46:54 +00:00
|
|
|
|
2017-07-17 18:11:23 +00:00
|
|
|
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;
|
2017-09-03 06:46:54 +00:00
|
|
|
|
2017-07-17 18:11:23 +00:00
|
|
|
if (type == PIXMAN_TYPE_OTHER)
|
|
|
|
return 0;
|
2017-09-03 06:46:54 +00:00
|
|
|
--
|
2017-07-17 18:11:23 +00:00
|
|
|
2.7.4
|