]> git.eshelyaron.com Git - emacs.git/commit
Improve portability of alpha channel handling on TrueColor visuals
authorPo Lu <luangruo@yahoo.com>
Mon, 31 Jan 2022 09:59:12 +0000 (17:59 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 31 Jan 2022 10:05:13 +0000 (18:05 +0800)
commit79896d3eb7f0d2e351196e5c896e21001b75f436
treeaa59eb9f48fbca32d0a964ad2a9c22d714656afc
parent9a56b4e6864c4e0815bb67805cfa67910ab3eeb5
Improve portability of alpha channel handling on TrueColor visuals

* src/xfns.c (select_visual): Always ask for a TrueColor visual.
* src/xfont.c (xfont_draw):
* src/xftfont.c (xftfont_draw): Test `alpha_bits' instead of
n_planes.
* src/xterm.c (x_fill_rectangle, x_clear_rectangle): Likewise.
(x_query_colors, x_alloc_nearest_color): Remove code that
hard-coded alpha mask.
(x_term_init): Calculate alpha bits and offset and populate
field appropriately.
* src/xterm.h (struct x_display_info): New fields `alpha_bits'
and `alpha_offset'.
(x_make_truecolor_pixel): Stop hardcoding the value of the alpha
mask.
src/xfns.c
src/xfont.c
src/xftfont.c
src/xterm.c
src/xterm.h