diff options
author | Ken Raeburn <raeburn@raeburn.org> | 2015-10-03 00:18:50 -0400 |
---|---|---|
committer | Ken Raeburn <raeburn@raeburn.org> | 2015-10-08 01:44:42 -0400 |
commit | e23ed19ff933c35111f3a806b4104fee8ef42f55 (patch) | |
tree | dca1de3b389da477befb537c46a3a7992c02b1ea /lisp/emacs-lisp/syntax.el | |
parent | b8eea1d7b1485a147f112127c0ca58cb1a0a8ebb (diff) | |
download | emacs-e23ed19ff933c35111f3a806b4104fee8ef42f55.tar.gz emacs-e23ed19ff933c35111f3a806b4104fee8ef42f55.tar.bz2 emacs-e23ed19ff933c35111f3a806b4104fee8ef42f55.zip |
Reduce color allocation/query traffic in the TrueColor case.
When working with an X visual with TrueColor class, pixel values can
be generated from the RGB values according to mask value provided by
the server on connection. Some of the image-handling code was already
doing this.
* src/xterm.h (x_make_truecolor_pixel): New function; code taken from
lookup_rgb_color.
(x_mutable_colormap): New function.
* src/image.c (lookup_rgb_color): Move pixel composition code to
x_make_truecolor_pixel.
(x_kill_gs_process): Call x_mutable_colormap.
* src/xfaces.c (x_free_colors, x_free_dpy_colors): Call
x_mutable_colormap.
* src/xftfont.c (xftfont_get_colors): Call x_query_colors.
* src/xterm.c (x_query_colors): For a TrueColor display, decompose the
pixel value into RGB values directly, and don't send a request to the
server.
(x_alloc_nearest_color): For a TrueColor display, construct the pixel
value with x_make_truecolor_pixel.
(x_copy_color): For an immutable color map, just return the provided
pixel value.
Diffstat (limited to 'lisp/emacs-lisp/syntax.el')
0 files changed, 0 insertions, 0 deletions