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/cubes/CubesActivity.java
166 166
      {
167 167
      GLSurfaceView mView = (GLSurfaceView) this.findViewById(R.id.cubesSurfaceView);
168 168
      if( mView!=null ) mView.onPause();
169
        
169

  
170
      Distorted.onPause();
170 171
      super.onPause();
171 172
      }
172 173

  

Also available in: Unified diff