From ce40992933a66f58f749ce18eeb76f65ae8babf1 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Mon, 1 Jul 2013 07:42:17 -0700 Subject: j3dcore: annotate the scoped nodes list in SetLiveState Signed-off-by: Harvey Harrison --- src/classes/share/javax/media/j3d/GroupRetained.java | 4 ++-- src/classes/share/javax/media/j3d/RenderBin.java | 8 ++++---- src/classes/share/javax/media/j3d/SetLiveState.java | 16 ++++++++-------- src/classes/share/javax/media/j3d/SoundScheduler.java | 16 ++++++---------- src/classes/share/javax/media/j3d/SoundStructure.java | 16 ++++++---------- .../share/javax/media/j3d/ViewSpecificGroupRetained.java | 4 ++-- 6 files changed, 28 insertions(+), 36 deletions(-) diff --git a/src/classes/share/javax/media/j3d/GroupRetained.java b/src/classes/share/javax/media/j3d/GroupRetained.java index 5b444c6..edde74f 100644 --- a/src/classes/share/javax/media/j3d/GroupRetained.java +++ b/src/classes/share/javax/media/j3d/GroupRetained.java @@ -1555,7 +1555,7 @@ synchronized void setAltAppScope() { s.changedViewGroup = new ArrayList(); s.changedViewList = new ArrayList(); s.keyList = new int[10]; - s.viewScopedNodeList = new ArrayList(); + s.viewScopedNodeList = new ArrayList(); s.scopedNodesViewList = new ArrayList>(); } @@ -1717,7 +1717,7 @@ synchronized void setAltAppScope() { s.changedViewGroup = new ArrayList(); s.changedViewList = new ArrayList(); s.keyList = new int[10]; - s.viewScopedNodeList = new ArrayList(); + s.viewScopedNodeList = new ArrayList(); s.scopedNodesViewList = new ArrayList>(); } diff --git a/src/classes/share/javax/media/j3d/RenderBin.java b/src/classes/share/javax/media/j3d/RenderBin.java index 31f357f..29cb7bf 100644 --- a/src/classes/share/javax/media/j3d/RenderBin.java +++ b/src/classes/share/javax/media/j3d/RenderBin.java @@ -6674,7 +6674,7 @@ void addGeometryDlist(RenderAtomListInfo ra) { } void insertNodes(J3dMessage m) { - ArrayList viewScopedNodes = (ArrayList) m.args[3]; + ArrayList viewScopedNodes = (ArrayList)m.args[3]; ArrayList> scopedNodesViewList = (ArrayList>)m.args[4]; int i; Object[] nodes = (Object[])m.args[0]; @@ -6716,7 +6716,7 @@ void insertNodes(J3dMessage m) { if (viewScopedNodes != null) { int size = viewScopedNodes.size(); for (i = 0; i < size; i++) { - NodeRetained n = (NodeRetained)viewScopedNodes.get(i); + NodeRetained n = viewScopedNodes.get(i); ArrayList vl = scopedNodesViewList.get(i); // If the node object is scoped to this view, then .. if (vl.contains(view)) { @@ -6755,7 +6755,7 @@ void insertNodes(J3dMessage m) { } void removeNodes(J3dMessage m) { - ArrayList viewScopedNodes = (ArrayList) m.args[3]; + ArrayList viewScopedNodes = (ArrayList)m.args[3]; ArrayList> scopedNodesViewList = (ArrayList>)m.args[4]; int i; Object[] nodes = (Object[])m.args[0]; @@ -6805,7 +6805,7 @@ void removeNodes(J3dMessage m) { if (viewScopedNodes != null) { int size = viewScopedNodes.size(); for (i = 0; i < size; i++) { - NodeRetained node = (NodeRetained)viewScopedNodes.get(i); + NodeRetained node = viewScopedNodes.get(i); ArrayList vl = scopedNodesViewList.get(i); // If the node object is scoped to this view, then .. if (vl.contains(view)) { diff --git a/src/classes/share/javax/media/j3d/SetLiveState.java b/src/classes/share/javax/media/j3d/SetLiveState.java index ab78cf9..f7f5d1f 100644 --- a/src/classes/share/javax/media/j3d/SetLiveState.java +++ b/src/classes/share/javax/media/j3d/SetLiveState.java @@ -57,14 +57,14 @@ class SetLiveState extends Object { */ ArrayList nodeList = new ArrayList(); - /** - * List of nodes that are viewScoped. Note that all nodes - * except Shape3D nodes can be in viewScopedNodeList, shape3D - * nodes will always be in the nodeList regardless of scoped - * or not. Also, only renderbin and renderingEnv structure is - * interested in viewScopedNodeList - */ - ArrayList viewScopedNodeList = null; +/** + * List of nodes that are viewScoped. Note that all nodes + * except Shape3D nodes can be in viewScopedNodeList, shape3D + * nodes will always be in the nodeList regardless of scoped + * or not. Also, only renderbin and renderingEnv structure is + * interested in viewScopedNodeList + */ +ArrayList viewScopedNodeList = null; /** * Parallel list to viewScopedNodeList containing a list of views diff --git a/src/classes/share/javax/media/j3d/SoundScheduler.java b/src/classes/share/javax/media/j3d/SoundScheduler.java index 892ad3b..386e61b 100644 --- a/src/classes/share/javax/media/j3d/SoundScheduler.java +++ b/src/classes/share/javax/media/j3d/SoundScheduler.java @@ -326,12 +326,11 @@ class SoundScheduler extends J3dStructure { void insertNodes(J3dMessage m) { Object[] nodes = (Object[])m.args[0]; - ArrayList viewScopedNodes = (ArrayList)m.args[3]; + ArrayList viewScopedNodes = (ArrayList)m.args[3]; ArrayList> scopedNodesViewList = (ArrayList>)m.args[4]; - Object node; for (int i=0; i vl = scopedNodesViewList.get(i); // If the node object is scoped to this view, then .. if (vl.contains(view)) { @@ -396,12 +394,11 @@ class SoundScheduler extends J3dStructure { */ void removeNodes(J3dMessage m) { Object[] nodes = (Object[])m.args[0]; - ArrayList viewScopedNodes = (ArrayList)m.args[3]; + ArrayList viewScopedNodes = (ArrayList)m.args[3]; ArrayList> scopedNodesViewList = (ArrayList>)m.args[4]; - Object node; for (int i=0; i vl = scopedNodesViewList.get(i); // If the node object is scoped to this view, then .. if (vl.contains(view)) { diff --git a/src/classes/share/javax/media/j3d/SoundStructure.java b/src/classes/share/javax/media/j3d/SoundStructure.java index 8c65c43..77ac722 100644 --- a/src/classes/share/javax/media/j3d/SoundStructure.java +++ b/src/classes/share/javax/media/j3d/SoundStructure.java @@ -166,12 +166,11 @@ class SoundStructure extends J3dStructure { void insertNodes(J3dMessage m) { Object[] nodes = (Object[])m.args[0]; - ArrayList viewScopedNodes = (ArrayList)m.args[3]; + ArrayList viewScopedNodes = (ArrayList)m.args[3]; ArrayList> scopedNodesViewList = (ArrayList>)m.args[4]; - Object node; for (int i=0; i vl = scopedNodesViewList.get(i); int vsize = vl.size(); if (node instanceof SoundRetained) { @@ -255,12 +253,11 @@ class SoundStructure extends J3dStructure { void removeNodes(J3dMessage m) { Object[] nodes = (Object[])m.args[0]; - ArrayList viewScopedNodes = (ArrayList)m.args[3]; + ArrayList viewScopedNodes = (ArrayList)m.args[3]; ArrayList> scopedNodesViewList = (ArrayList>)m.args[4]; - Object node; for (int i=0; i vl = scopedNodesViewList.get(i); // If the node object is scoped to this view, then .. int vsize = vl.size(); diff --git a/src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java b/src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java index 515dee1..5b83b4c 100644 --- a/src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java +++ b/src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java @@ -541,7 +541,7 @@ Enumeration getAllViews() { s.changedViewGroup = new ArrayList(); s.changedViewList = new ArrayList(); s.keyList = new int[10]; - s.viewScopedNodeList = new ArrayList(); + s.viewScopedNodeList = new ArrayList(); s.scopedNodesViewList = new ArrayList>(); } super.setLive(s); @@ -555,7 +555,7 @@ Enumeration getAllViews() { s.changedViewGroup = new ArrayList(); s.changedViewList = new ArrayList(); s.keyList = new int[10]; - s.viewScopedNodeList = new ArrayList(); + s.viewScopedNodeList = new ArrayList(); s.scopedNodesViewList = new ArrayList>(); } // XXXX: This is a hack since removeNodeData is called before -- cgit v1.2.3