commit d558d9bdf0415e1099f0cc8f55e14d2d8ba5cf3a
Author: Leszek Koltunski <leszek@distoretedandroid.org>
Date:   Tue Dec 13 13:33:45 2016 +0000

    Minor improvements in DistortedTexture.

diff --git a/src/main/java/org/distorted/library/DistortedTexture.java b/src/main/java/org/distorted/library/DistortedTexture.java
index 7cbb382..3afadac 100644
--- a/src/main/java/org/distorted/library/DistortedTexture.java
+++ b/src/main/java/org/distorted/library/DistortedTexture.java
@@ -37,6 +37,7 @@ public class DistortedTexture
   float mHalfX, mHalfY, mHalfZ;         // halves of the above
 
   private long mID;
+  private long mBitmapID=0;
 
   private Bitmap[] mBmp= null; //
   int[] mTextureDataH;         // have to be shared among all the cloned Objects
@@ -96,9 +97,18 @@ public class DistortedTexture
 
   long getBitmapID()
     {
-    return mBmp==null ? 0 : mBmp.hashCode();
+    if( mBmp!=null && mBitmapID==0 ) mBitmapID = mBmp.hashCode();
+
+    return mBitmapID;
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  long getID()
+      {
+      return mID;
+      }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   static synchronized void reset()
@@ -156,8 +166,9 @@ public class DistortedTexture
  *
  * @param dt    Source object to create our object from
  * @param flags A bitmask of values specifying what to copy.
- *              For example, CLONE_BITMAP.
+ *              Only possibilities: CLONE_BITMAP or CLONE_NOTHING.
  */
+
   public DistortedTexture(DistortedTexture dt, int flags)
     {
     mID = mNextID++;
@@ -189,7 +200,6 @@ public class DistortedTexture
       }
     }
 
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
  * Releases all resources.
@@ -259,15 +269,4 @@ public class DistortedTexture
       return mSizeZ;
       }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Returns unique ID of this instance.
- *
- * @return ID of the object.
- */
-  public long getID()
-      {
-      return mID;
-      }
-
   }
