diff options
author | Sven Gothel <[email protected]> | 2010-04-15 03:44:12 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-04-15 03:44:12 +0200 |
commit | 2ae28d54858ff684bc2368e0476a7a357dc63432 (patch) | |
tree | 41524bc7be69f029d2b183128cc0c8b89ec4754c /make/config/nativewindow/x11-CustomJavaCode.java | |
parent | 2df3bea10859ee2f2c4b3622f3b610b17a5749d6 (diff) |
Further ATI (fglrx) X11Display bug workaround/cleanup
- See https://bugzilla.mozilla.org/show_bug.cgi?id=486277
- Calling XCloseDisplay occasionally leads to a SIGSEGV,
even thought the reference is valid and OK.
Workaround is not to close any X11Display,
but to hold them stashed and reuse them.
Since we already pipeline all X11Display's
via Nativewindow's X11Util, an added referenceCounter
and a global active/passive list solved this problem.
This workaround is only active in case 'isVendorATI()'.
NEWT/NativeWindow X11:
- Let XIOErrorHandler and invalid display references
fail hard with FatalError, otherwise we won't see
the stack trace - and those bugs are indeed fatal.
NativeWindow X11:
- Install XIOErrorHandler, which stays active.
- X11Util.X11Display:
- Add reference counter
- Add global active/passive list.
Passive if reference count == 0
and marked as 'un-closeable' (-> ATI).
Reusing passive members when create a new display.
-
JOGL:
- Use DeleteLocalRef() calls to free temp NIO buffer
in manual *Copied implementation.
- GLDrawableFactoryImpl: Be serious about the shutdown() semantics
- *GraphicsConfiguration:
- Fix the invalid Onscreen/PBuffer/Pixmap determination (X11/EGL/WGL)
- Just return null if not valid
- X11GLXGraphicsConfigurationFactory - FBConfig
- Determine recommendedIndex properly ..
- Don't bail out if a FBConfig is invalid ..
- Use Chooser in case nothing is recommended ..
- X11OffscreenGLXDrawable fixes bugs:
- wrong (int) cast of parent window in XCreatePixmap call
- setting display to zero too early in destruction, ie
before XCloseDisplay
- X11GLXDrawableFactory is using [singleton] shared dummy resources for
- Screen, Drawable and Context
which are utilized in case they are needed ..
They are removed at shutdown call
- GLXVersion gathering in GLXUtil now ..
- DefaultGLCapabilitiesChooser: Respect PBuffer selection
Tests:
- Add DrawableFactory shutdown()
- Add various Offscreen Capabilties
- Add Offscreen and non-pbuffer case
- JUnit Passed (Linux64bit: NVidia/ATI)
- demos.jrefract.JRefract passed (Linux64bit: NVidia/ATI)
Diffstat (limited to 'make/config/nativewindow/x11-CustomJavaCode.java')
-rw-r--r-- | make/config/nativewindow/x11-CustomJavaCode.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/make/config/nativewindow/x11-CustomJavaCode.java b/make/config/nativewindow/x11-CustomJavaCode.java index d631c92cb..57f37bee7 100644 --- a/make/config/nativewindow/x11-CustomJavaCode.java +++ b/make/config/nativewindow/x11-CustomJavaCode.java @@ -24,8 +24,16 @@ /** Entry point to C language function: <code> XVisualInfo * XGetVisualInfo(Display * , long, XVisualInfo * , int * ); </code> */ private static native java.nio.ByteBuffer XGetVisualInfoCopied1(long arg0, long arg1, java.nio.ByteBuffer arg2, Object arg3, int arg3_byte_offset); - public static native long XOpenDisplay(String arg0); - public static native int XCloseDisplay(long display); + public static native long DefaultVisualID(long display, int screen); + + /** + public static native long CreateDummyWindow(long display, int screen_index, long visualID); + public static native void DestroyDummyWindow(long display, long window); */ + public static native long dlopen(String name); public static native long dlsym(String name); + public static native int XCloseDisplay(long display); + public static native void XUnlockDisplay(long display); + public static native void XLockDisplay(long display); + |