JDK-8112747 : Render tree is modified during Text bounds calculation
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: fx2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2011-05-24
  • Updated: 2015-06-16
  • Resolved: 2012-03-28
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 :  
Description
Render tree is accessed and modified during Text bounds calculation and other TextHelper operations. These operations can be invoked outside of pulses and so the render tree modifications in them are problematic for the future concurrent rendering.

Here is example of a problematic TextHelper method:

@Override public BaseBounds computeBounds(BaseBounds bounds, BaseTransform tx) {
    Scene.impl_setAllowPGAccess(true);
    NGText ng = (NGText) text.impl_getPGNode();
    text.impl_syncPGNodeDirect();
    Scene.impl_setAllowPGAccess(false);
    return ng.computeContentBounds(bounds, tx);
}

One possible solution was prototyped here:
http://javame-linux.czech.sun.com/r/1085/

Diff:
http://javame-linux.czech.sun.com/r/1085/diff/1-3/


Comments
verified in b13
21-06-2012

This fix expected to lead to some performance regression. According to Aurora results the performance regression observed in fx2.2-h29-b03 in SpiralText is about 10% (~3 fps).
10-04-2012

There's a few JIRAs filed as a follow up or to address issues noticed during the fix: http://javafx-jira.kenai.com/browse/RT-20645: Make use of dirty bits in selectively syncing Text node state http://javafx-jira.kenai.com/browse/RT-20617: Reformat very long lines in Text.java http://javafx-jira.kenai.com/browse/RT-20646: Webview should use PG interface (or higher) not directly use NGText http://javafx-jira.kenai.com/browse/RT-20647: PG layer test infrastructure needs to know about PGTextHelper http://javafx-jira.kenai.com/browse/RT-20648: Parent_structure_sync_Test is sole client of impl_syncPGNodeDirect()
28-03-2012

Some of the necessary separation may occur as a bi-product of refactoring to support complex text and styled text. That work isn't focused on fixing this particular issue so will leave work to be done, but hopefully less of it.
19-10-2011

Approved at 8/22 meeting
23-08-2011

SQE - OK to defer
18-08-2011

This is out of scope for Presidio. The Prism rendering thread and the FX app thread never run in parallel. In Lombard, we plan to run these threads in parallel, so this bug must be fixed then, but isn't important before then.
17-08-2011