]> git.eshelyaron.com Git - emacs.git/commitdiff
Enable TrueColor allocation optimizations on all visuals
authorPo Lu <luangruo@yahoo.com>
Thu, 10 Feb 2022 12:00:47 +0000 (20:00 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 10 Feb 2022 12:00:47 +0000 (20:00 +0800)
* src/xterm.c (x_alloc_nearest_color): Enable optimizations on
32-bit TrueColor visuals that legitimately don't have an alpha
mask.

src/xterm.c

index 469077c89722b5c9759cfd57943b1b1aa68bb97a..095ed316cfa16fbde7b4110ce83f3127790c084b 100644 (file)
@@ -3292,9 +3292,7 @@ x_alloc_nearest_color (struct frame *f, Colormap cmap, XColor *color)
 
   gamma_correct (f, color);
 
-  if (dpyinfo->red_bits > 0
-      && (dpyinfo->n_planes != 32
-         || dpyinfo->alpha_bits > 0))
+  if (dpyinfo->red_bits > 0)
     {
       color->pixel = x_make_truecolor_pixel (dpyinfo,
                                             color->red,