8014883: java.awt.container.add(component comp object constraints) doesn't work as expected on some linux platforms
authorprr
Wed, 07 Aug 2013 18:24:17 -0700
changeset 19171 14d41f09941b
parent 19170 a4a06c9e8e07
child 19182 821c274ea5d9
8014883: java.awt.container.add(component comp object constraints) doesn't work as expected on some linux platforms Reviewed-by: jgodinez
jdk/makefiles/CompileNativeLibraries.gmk
jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c
--- a/jdk/makefiles/CompileNativeLibraries.gmk	Tue Aug 06 22:47:14 2013 -0700
+++ b/jdk/makefiles/CompileNativeLibraries.gmk	Wed Aug 07 18:24:17 2013 -0700
@@ -798,6 +798,16 @@
 	LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15
 endif
 
+ifeq ($(OPENJDK_TARGET_OS),linux)
+ifndef OPENJDK
+include $(JDK_TOPDIR)/make/closed/xawt.gmk
+endif
+
+ifeq ($(DISABLE_XRENDER),true)
+	LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true
+endif
+endif
+
 ifeq ($(MILESTONE),internal)
 	LIBAWT_XAWT_CFLAGS += -DINTERNAL_BUILD
 endif
--- a/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c	Tue Aug 06 22:47:14 2013 -0700
+++ b/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c	Wed Aug 07 18:24:17 2013 -0700
@@ -269,6 +269,13 @@
     static jboolean firstTime = JNI_TRUE;
 
     if (firstTime) {
+#ifdef DISABLE_XRENDER_BY_DEFAULT
+        if (verbose == JNI_FALSE) {
+            xrenderAvailable = JNI_FALSE;
+            firstTime = JNI_FALSE;
+            return xrenderAvailable;
+        }
+#endif
         AWT_LOCK();
         xrenderAvailable = IsXRenderAvailable(verbose);
         AWT_UNLOCK();