diff options
author | Po Lu <luangruo@yahoo.com> | 2022-01-20 10:48:25 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-01-20 10:48:25 +0800 |
commit | 8c184bb166048e9ae65245cab75a4d49642a69fe (patch) | |
tree | 91a158c4a01223fdbdbb559c8adcab35ba9fd6eb /src/image.c | |
parent | d2a23c7441dda2f0650b78d4bb9e2340a02b66bc (diff) | |
download | emacs-8c184bb166048e9ae65245cab75a4d49642a69fe.tar.gz |
Get rid of calls to XRenderQueryExtension after terminal initialization
* src/image.c (x_create_xrender_picture):
(Fimage_transforms_p): Use `xrender_supported_p'.
* src/xterm.c (x_term_init): Query for XRender support and
extension versions.
* src/xterm.h (struct x_display_info): New fields
`xrender_supported_p', `xrender_major' and `xrender_minor'.
Diffstat (limited to 'src/image.c')
-rw-r--r-- | src/image.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/image.c b/src/image.c index a4976caba86..ce9af2dd677 100644 --- a/src/image.c +++ b/src/image.c @@ -2906,9 +2906,8 @@ x_create_xrender_picture (struct frame *f, Emacs_Pixmap pixmap, int depth) { Picture p; Display *display = FRAME_X_DISPLAY (f); - int event_basep, error_basep; - if (XRenderQueryExtension (display, &event_basep, &error_basep)) + if (FRAME_DISPLAY_INFO (f)->xrender_supported_p) { if (depth <= 0) depth = DefaultDepthOfScreen (FRAME_X_SCREEN (f)); @@ -11198,8 +11197,7 @@ The list of capabilities can include one or more of the following: # elif defined (HAVE_X_WINDOWS) && defined (HAVE_XRENDER) int event_basep, error_basep; - if (XRenderQueryExtension (FRAME_X_DISPLAY (f), - &event_basep, &error_basep)) + if (FRAME_DISPLAY_INFO (f)->xrender_supported_p) return list2 (Qscale, Qrotate90); # elif defined (HAVE_NTGUI) return (w32_image_rotations_p () |