Commit f0ba93c1 authored by Pablo Castellano's avatar Pablo Castellano Committed by Pekka Paalanen

compositor-fbdev: add support for ABGR

Make fbdev work with some Android downstream kernels, like the
asus-grouper (Google Nexus 7 2012).
Signed-off-by: Oliver Smith's avatarOliver Smith <ollieparanoid@bitmessage.ch>
parent b1006684
......@@ -234,8 +234,8 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
vinfo->blue.msb_right != 0)
return 0;
/* 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 ||
......@@ -247,6 +247,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment