RFR: 8375561: Class NGGroup is in need of some cleanup [v4]
Andy Goryachev
angorya at openjdk.org
Mon Jan 26 16:33:38 UTC 2026
On Thu, 22 Jan 2026 17:04:26 GMT, Christopher Schnick <duke at openjdk.org> wrote:
>> This should improve the code quality of the class while preserving its original workings
>
> Christopher Schnick has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove unused imports
modules/javafx.graphics/src/main/java/com/sun/javafx/sg/prism/NGGroup.java line 218:
> 216: for (int i = (startPos == -1 ? 0 : startPos); i < orderedChildren.size(); i++) {
> 217: NGNode child = orderedChildren.get(i);
> 218: child.render(g);
more on the concurrency here: if one would instrument the get(int) method in `children` like so
private final List<NGNode> children = new ArrayList<>(1) {
public NGNode get(int ix) {
System.out.println(Thread.currentThread());
return super.get(ix);
}
};
the log will show accesses from two threads:
Thread[#33,JavaFX Application Thread,5,main]
...
Thread[#28,QuantumRenderer-0,5,main]
...
Thread[#33,JavaFX Application Thread,5,main]
The access pattern for `viewOrderChildren` seem to show only QuantumRenderer thread, though I did not test extensively.
Does anyone know if these two threads are allowed to run in parallel, or is there a mechanism in place that ensures mutual exclusion?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2043#discussion_r2728325064
More information about the openjfx-dev
mailing list