diff options
7 files changed, 1 insertions, 87 deletions
diff --git a/src/classes/jogl/javax/media/j3d/JoglPipeline.java b/src/classes/jogl/javax/media/j3d/JoglPipeline.java index 7f7b47b..60364a1 100644 --- a/src/classes/jogl/javax/media/j3d/JoglPipeline.java +++ b/src/classes/jogl/javax/media/j3d/JoglPipeline.java @@ -4070,17 +4070,6 @@ class JoglPipeline extends Pipeline { // --------------------------------------------------------------------- // - // ImageComponent2DRetained methods - // - - // free d3d surface referred to by id - void freeD3DSurface(ImageComponent2DRetained image, int hashId) { - // Nothing to do - } - - // --------------------------------------------------------------------- - - // // Renderer methods // diff --git a/src/classes/share/javax/media/j3d/GraphicsContext3D.java b/src/classes/share/javax/media/j3d/GraphicsContext3D.java index 8bfd972..9df496b 100644 --- a/src/classes/share/javax/media/j3d/GraphicsContext3D.java +++ b/src/classes/share/javax/media/j3d/GraphicsContext3D.java @@ -683,15 +683,9 @@ public class GraphicsContext3D extends Object { if (this.background != null) { bg = (BackgroundRetained)this.background.retained; bg.setInImmCtx(false); - if (bg.image != null) { - bg.image.freeSurface(); - } } bg = (BackgroundRetained)background.retained; bg.setInImmCtx(true); - if (bg.image != null) { - bg.image.freeSurface(); - } this.background = background; } diff --git a/src/classes/share/javax/media/j3d/ImageComponent2DRetained.java b/src/classes/share/javax/media/j3d/ImageComponent2DRetained.java index b754b36..4e2d13b 100644 --- a/src/classes/share/javax/media/j3d/ImageComponent2DRetained.java +++ b/src/classes/share/javax/media/j3d/ImageComponent2DRetained.java @@ -23,11 +23,7 @@ import java.awt.color.ColorSpace; class ImageComponent2DRetained extends ImageComponentRetained { - // used in D3D to map object to surface pointer - int hashId; - ImageComponent2DRetained() { - hashId = hashCode(); } /** @@ -85,8 +81,6 @@ class ImageComponent2DRetained extends ImageComponentRetained { geomLock.unLock(); if (source.isLive()) { - freeSurface(); - // send a IMAGE_CHANGED message in order to // notify all the users of the change sendMessage(IMAGE_CHANGED, null); @@ -164,8 +158,6 @@ class ImageComponent2DRetained extends ImageComponentRetained { geomLock.unLock(); if (source.isLive()) { - freeSurface(); - // send a IMAGE_CHANGED message in order to // notify all the users of the change sendMessage(IMAGE_CHANGED, null); @@ -210,9 +202,6 @@ class ImageComponent2DRetained extends ImageComponentRetained { if (source.isLive()) { - // XXXX: check whether this is needed - freeSurface(); - // send a SUBIMAGE_CHANGED message in order to // notify all the users of the change @@ -310,10 +299,7 @@ class ImageComponent2DRetained extends ImageComponentRetained { if (source.isLive()) { - //XXXX: check whether this is needed - freeSurface(); - - // send a SUBIMAGE_CHANGED message in order to + // send a SUBIMAGE_CHANGED message in order to // notify all the users of the change ImageComponentUpdateInfo info; @@ -361,25 +347,6 @@ class ImageComponent2DRetained extends ImageComponentRetained { void clearLive(int refCount) { super.clearLive(refCount); - if (this.refCount <= 0) { - freeSurface(); - } } - void freeSurface() { - if (VirtualUniverse.mc.isD3D()) { - Pipeline.getPipeline().freeD3DSurface(this, hashId); - } - } - - // TODO KCR ISSUE 121 : REPLACE THIS WITH A WEAK REFERENCE OR OTHER SCHEME - // Issue 121 : Stop using finalize() to clean up state - // Use similar approach as in handling ogl Texture resource cleanup. -// protected void finalize() { -// System.err.println("finalize: " + this); -//// // For Pure immediate mode, there is no clearLive so -//// // surface will free when JVM do GC -//// freeSurface(); -// } - } diff --git a/src/classes/share/javax/media/j3d/ImageComponent3DRetained.java b/src/classes/share/javax/media/j3d/ImageComponent3DRetained.java index 468536c..f5e21ad 100644 --- a/src/classes/share/javax/media/j3d/ImageComponent3DRetained.java +++ b/src/classes/share/javax/media/j3d/ImageComponent3DRetained.java @@ -76,8 +76,6 @@ class ImageComponent3DRetained extends ImageComponentRetained { geomLock.unLock(); if (source.isLive()) { - // freeSurface(); - // send a IMAGE_CHANGED message in order to // notify all the users of the change sendMessage(IMAGE_CHANGED, null); @@ -150,8 +148,6 @@ class ImageComponent3DRetained extends ImageComponentRetained { geomLock.unLock(); if (source.isLive()) { - // freeSurface(); - // send a IMAGE_CHANGED message in order to // notify all the users of the change sendMessage(IMAGE_CHANGED, null); diff --git a/src/classes/share/javax/media/j3d/NativePipeline.java b/src/classes/share/javax/media/j3d/NativePipeline.java index 1a3288f..0eeffc9 100644 --- a/src/classes/share/javax/media/j3d/NativePipeline.java +++ b/src/classes/share/javax/media/j3d/NativePipeline.java @@ -1767,16 +1767,6 @@ class NativePipeline extends Pipeline { // --------------------------------------------------------------------- // - // ImageComponent2DRetained methods - // - - // free d3d surface referred to by id - native void freeD3DSurface(ImageComponent2DRetained image, int hashId); - - - // --------------------------------------------------------------------- - - // // Renderer methods // diff --git a/src/classes/share/javax/media/j3d/NoopPipeline.java b/src/classes/share/javax/media/j3d/NoopPipeline.java index 09e7b04..03303d9 100644 --- a/src/classes/share/javax/media/j3d/NoopPipeline.java +++ b/src/classes/share/javax/media/j3d/NoopPipeline.java @@ -706,18 +706,6 @@ class NoopPipeline extends Pipeline { // --------------------------------------------------------------------- // - // ImageComponent2DRetained methods - // - - // free d3d surface referred to by id - void freeD3DSurface(ImageComponent2DRetained image, int hashId) { - } - - - - // --------------------------------------------------------------------- - - // // Renderer methods // diff --git a/src/classes/share/javax/media/j3d/Pipeline.java b/src/classes/share/javax/media/j3d/Pipeline.java index d06532a..4df8fdb 100644 --- a/src/classes/share/javax/media/j3d/Pipeline.java +++ b/src/classes/share/javax/media/j3d/Pipeline.java @@ -711,16 +711,6 @@ abstract class Pipeline { // --------------------------------------------------------------------- // - // ImageComponent2DRetained methods - // - - // free d3d surface referred to by id - abstract void freeD3DSurface(ImageComponent2DRetained image, int hashId); - - - // --------------------------------------------------------------------- - - // // J3DBuffer methods // |