{
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));
# 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 ()
}
#endif
+#ifdef HAVE_XRENDER
+ int event_base, error_base;
+ dpyinfo->xrender_supported_p
+ = XRenderQueryExtension (dpyinfo->display, &event_base, &error_base);
+
+ if (dpyinfo->xrender_supported_p)
+ {
+ if (!XRenderQueryVersion (dpyinfo->display, &dpyinfo->xrender_major,
+ &dpyinfo->xrender_minor))
+ dpyinfo->xrender_supported_p = false;
+ }
+#endif
+
#if defined USE_CAIRO || defined HAVE_XFT
{
/* If we are using Xft, the following precautions should be made:
or larger than other for other applications, even if it is the same
font name (monospace-10 for example). */
-# ifdef HAVE_XRENDER
- int event_base, error_base;
- XRenderQueryExtension (dpyinfo->display, &event_base, &error_base);
-# endif
-
char *v = XGetDefault (dpyinfo->display, "Xft", "dpi");
double d;
if (v != NULL && sscanf (v, "%lf", &d) == 1)