JDK-8101513 : CLONE - Glass should not be the owner of graphics context (Glass client should be the owner)
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: fx2.0.2
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2011-10-21
  • Updated: 2015-06-16
  • Resolved: 2012-05-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 7
7u6Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Description
The clone is intended for Glass project.

While investigating http://javafx-jira.kenai.com/browse/RT-17345 I came to the conclusion that the current ownership of graphics context is wrong.

The reason we hit the issue in RT-17345 is because currently Glass owns the on-screen graphics context and requires the client to lock the View if it wants to use the context - ex: for releasing its resources. However, if the client happens to destroy the View then it can no longer use the graphics context.

We could require the client to change so that it releases any resource before closing the View, however, that should not be required if the graphics context was to be owned by the Glass client (ie. Prism)

If that were the case, then the client can release View at any time, and still be free to use its graphics context for releasing any resources. This is a much nicer scenario.

The changes related to this need to be done both in Glass and Glass client (ie. Prism)

For Glass we need to change the View to take the graphics context in the constructor.

For Prism we need to change the code, so that it creates the graphics context and then passes it to Glass when creating the View.
Comments
closing as unverified as there is no visible external impact and no unit test is provided
23-07-2012

Layers for plugin work is done and Chien has introduced ES2N impl - this work covers the changes required for these 2 features to work together. We made the decision to allow Prism to use its own context with only the shared context and the Prism internal texture id shared, so that Prism can do whatever it likes when rendering and at the end asks Glass to blit the texture it just rendered into.
15-05-2012

Need to make progress on CALayer to see how it shakes down before proceeding here.
27-03-2012

OK / SQE: no impact to sqe
14-12-2011

SQE: no impact
02-12-2011

This seems like something that should be resolved in the 2.1 time frame.
21-10-2011