NativeFX
NativeFX copied to clipboard
Use new PixelBuffer API
While not available in maven central, the new API using PixelBuffer can already be used. It would be nice to have this API being used in a branch, so that people can compare?
thats a good idea!
@johanvos do you know how to specify a local JavaFX installation in the openjfx plugin? I could work on this in the next couple of days.
Not possible yet, will be added very soon though.
Ok. Then I'll wait until that's done.
This is now available in the new 0.0.8-SNAPSHOT
of javafx-gradle-plugin
. To use this, add a settings.gradle
file with the following:
pluginManagement {
repositories {
gradlePluginPortal()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
}
In build.gradle
, update the plugin version to 0.0.8-SNAPSHOT
and add a declaration for sdk
in the javafx
block:
plugins {
...
id 'org.openjfx.javafxplugin' version '0.0.8-SNAPSHOT'
}
...
javafx {
modules = [ 'javafx.controls' ]
sdk = "path-to-javafx-sdk"
}
Cool! So I have no excuses anymore ;)
Just for the record, this is how I currently fetch the preview release:
javafx {
modules = [ 'javafx.controls']
sdk = "$projectDir/deps/javafx-sdk/sdk/javafx-sdk-13/"
}
task downloadJFX13(type: Download) {
if(isWindows) {
src 'https://download2.gluonhq.com/openjfx/forks/pixelbuffer/openjfx-13-pixelbuffer-ea+10_windows-x64_bin-sdk.zip'
} else if(isLinux) {
src 'https://download2.gluonhq.com/openjfx/forks/pixelbuffer/openjfx-13-pixelbuffer-ea+10_linux-x64_bin-sdk.zip'
} else if(isMacOs) {
src 'https://download2.gluonhq.com/openjfx/forks/pixelbuffer/openjfx-13-pixelbuffer-ea+10_osx-x64_bin-sdk.zip'
}
dest "$projectDir/deps/javafx-sdk/sdk.zip"
onlyIfNewer true
}
task downloadAndUnzipJFX13(dependsOn: downloadJFX13, type: Copy) {
from zipTree(downloadJFX13.dest)
into "$projectDir/deps/javafx-sdk/sdk/"
}
The good news is that the new API works. We consume around 50% less CPU on the java client. We have to reconsider the native mutex stuff though. It seems that we waste too much time waiting until native rendering is done.
So far so good. For my understanding: what native mutex do you mean? Inside the OpenJFX implementation, or in NativeFX code?
NativeFX