v0.4.2: lots of performance improvements to fog visuals

This commit is contained in:
Evan Debenham
2016-08-24 03:17:45 -04:00
committed by Evan Debenham
parent b325858644
commit 2bd1962b34
17 changed files with 170 additions and 53 deletions

View File

@@ -40,6 +40,14 @@ public class SmartTexture extends Texture {
public Bitmap bitmap;
public Atlas atlas;
protected SmartTexture( ) {
super();
//useful for subclasses which want to manage their own texture data
// in cases where android.graphics.bitmap isn't fast enough.
//subclasses which use this MUST also override reload()
}
public SmartTexture( Bitmap bitmap ) {
this( bitmap, NEAREST, CLAMP, false );
@@ -92,8 +100,9 @@ public class SmartTexture extends Texture {
public void delete() {
super.delete();
bitmap.recycle();
if (bitmap != null)
bitmap.recycle();
bitmap = null;
}