opt
This commit is contained in:
@@ -39,6 +39,8 @@ public class JSurfaceView extends SurfaceView implements Runnable, SurfaceHolder
|
||||
*/
|
||||
private int[] mFrames;
|
||||
|
||||
private Thread mThread;
|
||||
|
||||
// 使用 BitmapFactory.Option.inBitmap 属性复用 bitmap 对象
|
||||
private Bitmap mContainerBitmap = null;
|
||||
|
||||
@@ -78,12 +80,19 @@ public class JSurfaceView extends SurfaceView implements Runnable, SurfaceHolder
|
||||
if ( bRunning ) {
|
||||
return;
|
||||
}
|
||||
ThreadPoolService.execute( this );
|
||||
bRunning = true;
|
||||
mThread = new Thread( this );
|
||||
mThread.start();
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
bRunning = false;
|
||||
try {
|
||||
mThread.interrupt();
|
||||
mThread = null;
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user