From 1d742f1d07e34d457c77eae7f99d09325326d997 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sun, 15 Jan 2012 04:30:20 +0000 Subject: [PATCH] - do not store useless reference to image in TextureAtlas git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9050 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/tools/jme3tools/optimize/TextureAtlas.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/src/tools/jme3tools/optimize/TextureAtlas.java b/engine/src/tools/jme3tools/optimize/TextureAtlas.java index e57e88534..559e5bffe 100644 --- a/engine/src/tools/jme3tools/optimize/TextureAtlas.java +++ b/engine/src/tools/jme3tools/optimize/TextureAtlas.java @@ -437,14 +437,14 @@ public class TextureAtlas { public TextureAtlasTile location; public Node child[]; - public Image image; + public boolean occupied; public Node(int x, int y, int width, int height) { location = new TextureAtlasTile(x, y, width, height); child = new Node[2]; child[0] = null; child[1] = null; - image = null; + occupied = false; } public boolean isLeaf() { @@ -462,7 +462,7 @@ public class TextureAtlas { return child[1].insert(image); } else { - if (this.image != null) { + if (occupied) { return null; // occupied } @@ -471,7 +471,7 @@ public class TextureAtlas { } if (image.getWidth() == location.getWidth() && image.getHeight() == location.getHeight()) { - this.image = image; // perfect fit + occupied = true; // perfect fit return this; }