Skip to content
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

Use new PixelBuffer API #7

Open
johanvos opened this issue Jun 27, 2019 · 10 comments
Open

Use new PixelBuffer API #7

johanvos opened this issue Jun 27, 2019 · 10 comments
Labels
help wanted Extra attention is needed

Comments

@johanvos
Copy link
Contributor

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?

@miho
Copy link
Owner

miho commented Jun 27, 2019

thats a good idea!

@miho miho added the help wanted Extra attention is needed label Jun 28, 2019
@miho
Copy link
Owner

miho commented Jul 18, 2019

@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.

@johanvos
Copy link
Contributor Author

Not possible yet, will be added very soon though.

@miho
Copy link
Owner

miho commented Jul 18, 2019

Ok. Then I'll wait until that's done.

@abhinayagarwal
Copy link

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"
}

@miho
Copy link
Owner

miho commented Jul 19, 2019

Cool! So I have no excuses anymore ;)

miho added a commit that referenced this issue Jul 19, 2019
@miho
Copy link
Owner

miho commented Jul 19, 2019

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/"
    
}

miho added a commit that referenced this issue Jul 19, 2019
@miho
Copy link
Owner

miho commented Jul 19, 2019

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.

@johanvos
Copy link
Contributor Author

So far so good. For my understanding: what native mutex do you mean? Inside the OpenJFX implementation, or in NativeFX code?

@miho
Copy link
Owner

miho commented Jul 19, 2019

NativeFX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants