From 8c184bb166048e9ae65245cab75a4d49642a69fe Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 20 Jan 2022 10:48:25 +0800 Subject: 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'. --- src/image.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/image.c') 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 () -- cgit v1.2.1