Project

General

Profile

« Previous | Next » 

Revision b0ebdf5e

Added by Leszek Koltunski about 7 years ago

Major:

1) in the Library, fix the fact that some applications (those that were creating their DistortedSurface objects outside of onSurfaceCreated or onSurfaceChanged) would not render after the activity went to background (press POWER to see that).
2) in the Apps, call the new 'Distorted.onPause()' API to fix the above problem

The above fixes the problem, but it still leaks memory if an App creates its Surface in onSurfaceCreated/Changed (precisely: it leaves the old Surface in the DistortedSurface Map). Thus

3) Fix the first 15 Apps to avoid the memory leak. Next Apps coming.

View differences:

src/main/java/org/distorted/examples/movingeffects/MovingEffectsRenderer.java
26 26
import android.graphics.Canvas;
27 27
import android.graphics.Paint;
28 28
import android.graphics.Paint.Style;
29
import android.opengl.GLES30;
30 29
import android.opengl.GLSurfaceView;
31 30

  
32 31
import org.distorted.library.DistortedScreen;
......
132 131
     texW = width;
133 132
     texH = height;
134 133

  
134
     if( mTexture!=null ) mTexture.markForDeletion();
135 135
     mTexture = new DistortedTexture(texW,texH);
136 136
     mBitmap  = Bitmap.createBitmap(texW,texH, Bitmap.Config.ARGB_8888);
137 137
     mCanvas  = new Canvas(mBitmap);

Also available in: Unified diff