xserver-multidpi/render
luporl 7e142cb2a8 xserver: fix RGB mask handling
On FreeBSD 13.0-CURRENT for PowerPC64 big-endian (BE), X was
crashing in some cases. For instance, when twm was started
and the background was clicked to open its menu, X crashed
with a segmentation fault, trying to dereference a null pointer
at CreatePicture().

There were 2 issues with xorg-server handling of RGB masks that
caused the pointer above to be null and thus the crash:
- wrong use of ffs() to get the RGB offsets from the masks
- overflow when shifting a 16-bit integer

This change fixes both issues. They happen when the system is BE
but has a video adapter using a little-endian (LE) ARGB32
framebuffer. In order to display the correct colors, this setup
requires a BE RGBA32 color format to be used by X, by setting
the RGB masks appropriately, that didn't work properly because of
the issues above.
2021-04-16 14:40:49 +00:00
..
Makefile.am render: Delete renderedge.[ch] 2010-11-01 22:54:18 -04:00
animcur.c animcur: Fix crash when removing a master device 2018-04-24 14:28:27 -04:00
filter.c Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
glyph.c Use ARRAY_SIZE all over the tree 2017-10-30 13:45:20 -04:00
glyphstr.h render: Hide/unexport some implementation details 2015-07-08 16:40:57 -04:00
matrix.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
meson.build meson: hide C API if Xorg is disabled (like autotools) 2021-03-11 00:22:36 +00:00
miindex.c Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
mipict.c mi: Add a default no-op miSourceValidate 2019-10-30 16:26:01 +00:00
mipict.h render: Hide/unexport some implementation details 2015-07-08 16:40:57 -04:00
mirect.c render: Simplify miCompositeRects 2018-02-26 10:02:24 -05:00
mitrap.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
mitri.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
picture.c xserver: fix RGB mask handling 2021-04-16 14:40:49 +00:00
picture.h exa: only draw valid trapezoids 2016-06-17 11:21:30 +02:00
picturestr.h render: Store and use all 16bpc of precision for solid pixels (v2.1) 2018-02-26 16:46:34 -05:00
render.c dix: Call SourceValidate before GetImage 2019-10-30 16:26:01 +00:00