-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native AWT #528
Merged
Native AWT #528
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add AWT and Swing and Java2D. ref assembly will be a copy of Windows for now, until we can figure out what to do
…inux, which depends on system copy.
Set up AWT/Printing properties based on OS. Ensure classes appropriate.
…ill need to be included in Image as well eventually to build fontconfig.bcf. Make UNICODE;_UNICODe default for windows builds.
After Unicode switch, make sure we marshal platform encoding, whatever that is (LPTSTR). Enable libjpeg.
Turn off some warnings.
…nternally needs to handle conversion to/from that.
Fix a few deps.
… into OpenJDK. Few more OPenJDK things. Fix up project files for other libs for OSX. Include a bunch of fixed .h files that have i64 suffix.
… used by lwawt. Unsure what's up with upstream with this. We do this by using a PreprocessorDirective to rewrite JRSCopyOSVersion to JRSCopyOSVersion2, which is then implemented statically to return 10.15, since it only cares whether it's snow leopard or below. Get FreeType and Fontmanager building. Add mapfiles to a few AWT projects. Get libawt_headless building and included.
… potentially going to call OnLoad which needs to capture the caller context class. After looking through this, we might be able to dump JNINativeLoader and exclusively use ClassLoader.c code for this. Needs more study. This would be a big reduction in code though. It handles WIn32 name mangling, all of that, on it's own. Unsafe.freeMemory can just return if null pointer, according to unsafe.cpp.
This was referenced May 24, 2024
Closed
Closed
…ing some symbols off because of it. Win32 shold only export things with attributes. Linux should use mapfiles. I'm not sure what's supposed to work with OSX. But we shall see.
…thout it. And, who cares, really?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New native libraries: libawt, libawt_headless, libawt_lwawt, libawt_xawt, libfontmanager, libfreetype, libjawt, libjnf, libjpeg, liblcms, libmlib_image, libosxui.
Notable:
libawt is the basic AWT library. The Windows version has the full implementation contained in it. On Linux, minor parts are included in libawt, and libawt_xawt or libawt_headless are loaded depending on whether in headless mode or not. On OSX libawt_lwawt is used.
Font support is done using freetype. This library is distributed with IKVM for Windows and OS X, but the Linux version relies on the platform freetype being present and linkable.
We are using static fontconfig files from Windows on each OS for now. This can be fixed later, but the files need to be generated at build time from templates.
Local imageio/jpeg stuff is removed. Replaced with libjpeg. The entirety of the peices of local AWT stuff are gone.
LoadLibrary now inherits the caller ID. This needs more review: I think we can use the complete LoadLibrary implementation in native code now to replace all this. But more research should be done.
mlib_image is a static library, and ends up embedded into the other deps.
OSX uses a Framework named JavaNativeFoundation. This does not exist on arm64, which seems to be the main reason JDK8 isn't available for newer Macs natively. JNF however was open sourced. We incorporate this source for ARM64 only. Still uses built in version for x64. Another Framework, JavaRuntimeSupport, is missing a method, which we implement as a DEFINE that points to an inline version.