From 3604fe3c6d8d2ceb9537bae97a1647b0fc5d7653 Mon Sep 17 00:00:00 2001 From: prr Date: Wed, 7 Aug 2013 18:24:17 -0700 Subject: [PATCH] 8014883: java.awt.container.add(component comp object constraints) doesn't work as expected on some linux platforms Reviewed-by: jgodinez --- makefiles/CompileNativeLibraries.gmk | 10 ++++++++++ src/solaris/native/sun/java2d/x11/XRBackendNative.c | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/makefiles/CompileNativeLibraries.gmk b/makefiles/CompileNativeLibraries.gmk index 02bf3be80..21bf4ebb5 100644 --- a/makefiles/CompileNativeLibraries.gmk +++ b/makefiles/CompileNativeLibraries.gmk @@ -798,6 +798,16 @@ ifeq ($(OPENJDK_TARGET_OS),solaris) 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 diff --git a/src/solaris/native/sun/java2d/x11/XRBackendNative.c b/src/solaris/native/sun/java2d/x11/XRBackendNative.c index 241c96f64..75d1cd2f4 100644 --- a/src/solaris/native/sun/java2d/x11/XRBackendNative.c +++ b/src/solaris/native/sun/java2d/x11/XRBackendNative.c @@ -269,6 +269,13 @@ Java_sun_awt_X11GraphicsEnvironment_initXRender 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(); -- GitLab