< prev index next >

jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c

Print this page




 425 
 426     // Only use the RENDER extension if it is available on the X server
 427     if (XQueryExtension(awt_display, "RENDER",
 428                         &major_opcode, &first_event, &first_error))
 429     {
 430         xrenderLibHandle = dlopen("libXrender.so.1", RTLD_LAZY | RTLD_GLOBAL);
 431 
 432 #ifdef MACOSX
 433 #define XRENDER_LIB "/usr/X11/lib/libXrender.dylib"
 434 #else
 435 #define XRENDER_LIB "libXrender.so"
 436 #endif
 437 
 438         if (xrenderLibHandle == NULL) {
 439             xrenderLibHandle = dlopen(XRENDER_LIB,
 440                                       RTLD_LAZY | RTLD_GLOBAL);
 441         }
 442 
 443 #ifndef __linux__ /* SOLARIS */
 444         if (xrenderLibHandle == NULL) {
 445             xrenderLibHandle = dlopen("/usr/sfw/lib/libXrender.so.1",
 446                                       RTLD_LAZY | RTLD_GLOBAL);
 447         }
 448 #endif
 449 
 450         if (xrenderLibHandle != NULL) {
 451             xrenderFindVisualFormat =
 452                 (XRenderFindVisualFormatFunc*)dlsym(xrenderLibHandle,
 453                                                     "XRenderFindVisualFormat");
 454         }
 455     }
 456 
 457     for (i = 0; i < nTrue; i++) {
 458         if (XVisualIDFromVisual(pVITrue[i].visual) ==
 459             XVisualIDFromVisual(defaultConfig->awt_visInfo.visual) ||
 460             pVITrue[i].depth == 12) {
 461             /* Skip the non-supported 12-bit TrueColor visual */
 462             continue;
 463         } else {
 464             ind = nConfig++;
 465         }




 425 
 426     // Only use the RENDER extension if it is available on the X server
 427     if (XQueryExtension(awt_display, "RENDER",
 428                         &major_opcode, &first_event, &first_error))
 429     {
 430         xrenderLibHandle = dlopen("libXrender.so.1", RTLD_LAZY | RTLD_GLOBAL);
 431 
 432 #ifdef MACOSX
 433 #define XRENDER_LIB "/usr/X11/lib/libXrender.dylib"
 434 #else
 435 #define XRENDER_LIB "libXrender.so"
 436 #endif
 437 
 438         if (xrenderLibHandle == NULL) {
 439             xrenderLibHandle = dlopen(XRENDER_LIB,
 440                                       RTLD_LAZY | RTLD_GLOBAL);
 441         }
 442 
 443 #ifndef __linux__ /* SOLARIS */
 444         if (xrenderLibHandle == NULL) {
 445             xrenderLibHandle = dlopen("/usr/lib/libXrender.so.1",
 446                                       RTLD_LAZY | RTLD_GLOBAL);
 447         }
 448 #endif
 449 
 450         if (xrenderLibHandle != NULL) {
 451             xrenderFindVisualFormat =
 452                 (XRenderFindVisualFormatFunc*)dlsym(xrenderLibHandle,
 453                                                     "XRenderFindVisualFormat");
 454         }
 455     }
 456 
 457     for (i = 0; i < nTrue; i++) {
 458         if (XVisualIDFromVisual(pVITrue[i].visual) ==
 459             XVisualIDFromVisual(defaultConfig->awt_visInfo.visual) ||
 460             pVITrue[i].depth == 12) {
 461             /* Skip the non-supported 12-bit TrueColor visual */
 462             continue;
 463         } else {
 464             ind = nConfig++;
 465         }


< prev index next >