-
Notifications
You must be signed in to change notification settings - Fork 464
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
8341418: Prism/es2 DrawableInfo is never freed (leak) #1586
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back tsayao! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
For now I'm looking for some guidance if this is the right path (In a broader sense, since I know I'm missing some details). Also, I would like to confirm if I can open a formal JBS bug. |
I have only tested on Linux. I don't own a Mac. I do have Windows, but it seems difficult to setup a build. |
Webrevs
|
Reviewers: @arapte @lukostyra /reviewers 2 |
@kevinrushforth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix works on Windows and macOS. I've left some additional comments.
modules/javafx.graphics/src/main/java/com/sun/prism/es2/ES2SwapChain.java
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/com/sun/prism/es2/GLDrawable.java
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/com/sun/prism/es2/IOSGLDrawable.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, seems fine on Windows with ES2 backend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix itself looks good. Providing a few minor comments.
modules/javafx.graphics/src/main/native-prism-es2/ios/IOSGLDrawable.c
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/native-prism-es2/macosx/MacGLDrawable.c
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/native-prism-es2/windows/WinGLDrawable.c
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/native-prism-es2/x11/X11GLDrawable.c
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/native-prism-es2/windows/WinGLDrawable.c
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/com/sun/prism/es2/IOSGLDrawable.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When creating a Scene, a
DrawableInfo
is allocated withmalloc
. When scene changes, this is called onWindowStage.java
:QuantumRenderer.getInstance().disposePresentable(painter.presentable); // latched on RT
But the underlying
DrawableInfo
is never freed.I also think this should be done when the Stage is closed.
To test:
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1586/head:pull/1586
$ git checkout pull/1586
Update a local copy of the PR:
$ git checkout pull/1586
$ git pull https://git.openjdk.org/jfx.git pull/1586/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1586
View PR using the GUI difftool:
$ git pr show -t 1586
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1586.diff
Webrev
Link to Webrev Comment