From d4a73b8d8988df086a13b6609f7ee7eeb057a335 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sat, 3 Mar 2012 13:32:05 -0800 Subject: j3dcore: only mark the cached view list as dirty if we actually change it Signed-off-by: Harvey Harrison --- src/classes/share/javax/media/j3d/ViewPlatformRetained.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/classes') diff --git a/src/classes/share/javax/media/j3d/ViewPlatformRetained.java b/src/classes/share/javax/media/j3d/ViewPlatformRetained.java index a34df45..47cb248 100644 --- a/src/classes/share/javax/media/j3d/ViewPlatformRetained.java +++ b/src/classes/share/javax/media/j3d/ViewPlatformRetained.java @@ -186,17 +186,15 @@ void setView(View v) { synchronized (viewList) { if (!viewList.contains(v)) { viewList.add(v); + viewListDirty = true; } - viewListDirty = true; } } void removeView(View v) { synchronized (viewList) { - if (viewList.contains(v)) { - viewList.remove(viewList.indexOf(v)); - } - viewListDirty = true; + if (viewList.remove(v)) + viewListDirty = true; } } -- cgit v1.2.3