From 707f8e66bba7c979a2095842fcc7f73bc311bf25 Mon Sep 17 00:00:00 2001 From: Kevin Rushforth Date: Wed, 9 Nov 2005 00:28:31 +0000 Subject: Fixed Issue 181 : Performance regression: j3d.optimizeForSpace=false ignored for some geometry git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@457 ba19aa83-45c5-6ac9-afd3-db810772062c --- .../share/javax/media/j3d/GeometryRetained.java | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/classes/share/javax/media/j3d/GeometryRetained.java b/src/classes/share/javax/media/j3d/GeometryRetained.java index 3def9c3..1f02d17 100644 --- a/src/classes/share/javax/media/j3d/GeometryRetained.java +++ b/src/classes/share/javax/media/j3d/GeometryRetained.java @@ -268,11 +268,25 @@ abstract class GeometryRetained extends NodeComponentRetained { return false; } - // Can't build display lists if geometry is editable - // XXXX: should look at isFrequent bit and allow DL if - // infrequently writable + // Can't build display lists if geometry is frequently writable + // + // Issue 181 : to fix performance regression from 1.3.2, we will allow + // editable geometry if the optimizeForSpace property is set false and + // the cachedChangedFrequent flag is set; note this will basically + // restore the 1.3.2 behavior, which isn't completely correct. + // Eventually, we should fix the bug that is causing the + // cachedChangedFrequent bit to be wrong; we can then remove the + // erroneous dependency on optimizeForSpace. if (this.isEditable) { - return false; + if (cachedChangedFrequent != 0) { + return false; + } + + // TODO: remove the following when cachedChangedFrequent is fixed + // to correctly reflect the state + if (!VirtualUniverse.mc.buildDisplayListIfPossible) { + return false; + } } if (this instanceof GeometryArrayRetained) { -- cgit v1.2.3