Code example for Surface

Methods: lockCanvas, unlockCanvasAndPost

0
	 
	//Called by the mediastreamer2 android display filter  
	public synchronized void update(){ 
		if (mSurface!=null){
			try { 
				Canvas canvas=mSurface.lockCanvas(null); 
				canvas.drawBitmap(mBitmap, 0, 0, null);
				mSurface.unlockCanvasAndPost(canvas);
				  
			} catch (IllegalArgumentException e) {
				// TODO Auto-generated catch block 
				e.printStackTrace();
			} catch (OutOfResourcesException e) {
				// TODO Auto-generated catch block 
				e.printStackTrace();
			}   
		}  
	} 
	 
    private static class Renderer implements GLSurfaceView.Renderer {
    	int ptr;