diff options
author | Kevin Rushforth <[email protected]> | 2005-11-09 00:28:31 +0000 |
---|---|---|
committer | Kevin Rushforth <[email protected]> | 2005-11-09 00:28:31 +0000 |
commit | 707f8e66bba7c979a2095842fcc7f73bc311bf25 (patch) | |
tree | 8d0856410e08e091629e08139398d2195dfacd5d /src | |
parent | 81ce3f9030a7e9704fcaece5d4b23238b4828bdc (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/classes/share/javax/media/j3d/GeometryRetained.java | 22 |
1 files 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) { |