JDK-8096813 : [Mac] Glass shouldn't use Prism's context for creating or destroying native rendering resources
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-10-16
  • Updated: 2017-10-13
  • Resolved: 2015-01-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8u60Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Glass on Mac has broken the contract with Prism in using its context. It shouldn't use Prism's context to create or destroy fbo and texture while Prism is still holding on to it. Glass should have created its own context using the existing shared context. Please see RT-38808 for details.
Comments
@Johan: can you file a new bug against this? We would be happy to accept a patch with the fix.
08-04-2015

The changeset http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/a69f48b048e5 seems to break the iOS implementation. IosView had a private long nativePtr that was set in a native method in GlassView.m The patch removes the field, but keeps the native code which results in a crash.
08-04-2015

Changeset: a69f48b048e5 Author: Chien Yang <chien.yang@oracle.com> Date: 2015-01-23 16:24 -0800 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/a69f48b048e5
24-01-2015

Dave says +1 after HelloSanity on the i.MX6
23-01-2015

I've done a full build test on Mac, Linux, Windows and embedded (armv6hf). I also did a full testing on Mac, and sanity testing on Linux and Windows. I have pinged Dave to do a quick sanity test on the embedded. I will wait for his feedback before I push the fix.
23-01-2015

Same question about testing on embedded: have you run the new code on imx6?
23-01-2015

The code changes look good to me. Also, I've done plenty of testing on Mac. I presume you have tested it on Windows and Linux? There aren't many changes to shared code, but there are some. +1
23-01-2015

Dave, Morris and Kevin, Please review the proposed fix. This fix includes the following: 1) Create a separate shared context solely for Glass to use to create or destroy FBO. 2) Moved away from the old approach of passing FBO id via prism's context. FBO id is now cached and passed back via a newly created native method, called in PresentableState.lock(). I have tested this fix with a full run of dev-build-full, applets, and many programs in toys and samples. I also verified that it builds fine for IOS (glass and es2). http://cr.openjdk.java.net/~ckyang/RT-39008/webrev.00/
16-01-2015

Need to examine or factor in RT-17545 and RT-21739 for this fix.
17-10-2014

If possible we should consider moving the code in GlassFrameBufferObject class into Prism.
17-10-2014