RFR: WIP: 8236651: Simplify and update glass gtk backend
Thiago Milczarek Sayao
tsayao at openjdk.java.net
Thu Jan 23 14:17:02 UTC 2020
On Tue, 14 Jan 2020 11:30:49 GMT, Thiago Milczarek Sayao <tsayao at openjdk.org> wrote:
>> I understand. Will do that when the code works 100%. I have submitted the PR to avoid duplicated efforts and let people test it (if anyone is willing).
>
> Sizing and positioning completed and fairly tested.
>
> Will look into mouse grabbing.
Performance test (on my setup, it runs slightly faster with this patch):
import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.stage.Stage;
import java.time.Duration;
import java.time.Instant;
import java.util.Timer;
import java.util.TimerTask;
public class HelloFx extends Application {
public HelloFx() {
}
@Override
public void start(Stage stage) {
Instant start = Instant.now();
Scene mainScene = new Scene(new Label("Perfomance test"), 600, 600);
stage.setScene(mainScene);
stage.show();
for (int i=0; i<1000; i++) {
Stage stage1 = new Stage();
Scene scene = new Scene(new Label("hi"), 200, 200);
stage1.setScene(scene);
stage1.setOnShown(e -> new Timer().schedule(
new TimerTask() {
@Override
public void run() {
Platform.runLater(stage1::hide);
}
},
100
));
stage1.showAndWait();
}
stage.close();
Instant end = Instant.now();
System.out.println(Duration.between(start, end).toString()
.substring(2)
.replaceAll("(\\d[HMS])(?!$)", "$1 ")
.toLowerCase());
Platform.exit();
}
}
-------------
PR: https://git.openjdk.java.net/jfx/pull/77
More information about the openjfx-dev
mailing list