--- old/src/java.desktop/unix/native/libawt_xawt/java2d/x11/XRBackendNative.c 2020-05-20 18:02:47.985299224 -0700 +++ new/src/java.desktop/unix/native/libawt_xawt/java2d/x11/XRBackendNative.c 2020-05-20 18:02:47.661293003 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,21 +35,6 @@ #include #endif -/* On Solaris 10 updates 8, 9, the render.h file defines these - * protocol values but does not define the structs in Xrender.h. - * Thus in order to get these always defined on Solaris 10 - * we will undefine the symbols if we have determined via the - * makefiles that Xrender.h is lacking the structs. This will - * trigger providing our own definitions as on earlier updates. - * We could assume that *all* Solaris 10 update versions will lack the updated - * Xrender.h and do this based solely on O/S being any 5.10 version, but this - * could still change and we'd be broken again as we'd be re-defining them. - */ -#ifdef SOLARIS10_NO_XRENDER_STRUCTS -#undef X_RenderCreateLinearGradient -#undef X_RenderCreateRadialGradient -#endif - #ifndef X_RenderCreateLinearGradient typedef struct _XLinearGradient { XPointFixed p1; @@ -72,29 +57,6 @@ #include -#if defined(__solaris__) -/* Solaris 10 will not have these symbols at compile time */ - -typedef Picture (*XRenderCreateLinearGradientFuncType) - (Display *dpy, - const XLinearGradient *gradient, - const XFixed *stops, - const XRenderColor *colors, - int nstops); - -typedef Picture (*XRenderCreateRadialGradientFuncType) - (Display *dpy, - const XRadialGradient *gradient, - const XFixed *stops, - const XRenderColor *colors, - int nstops); - -static -XRenderCreateLinearGradientFuncType XRenderCreateLinearGradientFunc = NULL; -static - XRenderCreateRadialGradientFuncType XRenderCreateRadialGradientFunc = NULL; -#endif - #define BUILD_TRANSFORM_MATRIX(TRANSFORM, M00, M01, M02, M10, M11, M12) \ { \ TRANSFORM.matrix[0][0] = M00; \ @@ -162,27 +124,6 @@ } else { available = JNI_FALSE; } -#elif defined(__solaris__) - xrenderlib = dlopen("libXrender.so",RTLD_GLOBAL|RTLD_LAZY); - if (xrenderlib != NULL) { - - XRenderCreateLinearGradientFunc = - (XRenderCreateLinearGradientFuncType) - dlsym(xrenderlib, "XRenderCreateLinearGradient"); - - XRenderCreateRadialGradientFunc = - (XRenderCreateRadialGradientFuncType) - dlsym(xrenderlib, "XRenderCreateRadialGradient"); - - if (XRenderCreateLinearGradientFunc == NULL || - XRenderCreateRadialGradientFunc == NULL) - { - available = JNI_FALSE; - } - dlclose(xrenderlib); - } else { - available = JNI_FALSE; - } #else Dl_info info; jboolean versionInfoIsFound = JNI_FALSE; @@ -593,13 +534,7 @@ colors[i].green = pixels[i*4 + 2]; colors[i].blue = pixels[i*4 + 3]; } -#ifdef __solaris__ - if (XRenderCreateLinearGradientFunc!=NULL) { - gradient = (*XRenderCreateLinearGradientFunc)(awt_display, &grad, stops, colors, numStops); - } -#else gradient = XRenderCreateLinearGradient(awt_display, &grad, stops, colors, numStops); -#endif free(colors); free(stops); @@ -677,13 +612,7 @@ colors[i].green = pixels[i*4 + 2]; colors[i].blue = pixels[i*4 + 3]; } -#ifdef __solaris__ - if (XRenderCreateRadialGradientFunc != NULL) { - gradient = (jint) (*XRenderCreateRadialGradientFunc)(awt_display, &grad, stops, colors, numStops); - } -#else gradient = (jint) XRenderCreateRadialGradient(awt_display, &grad, stops, colors, numStops); -#endif free(colors); free(stops);