Code example for Surface

Methods: release

0
            } 
        } 
 
        public boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) { 
            if (mSurface != null) { 
                mSurface.release(); 
                mSurface = null; 
            } 
            release(true); 
            return true; 
        } 
 
        private static final boolean ENABLE_FPS_DUMP = true; 
        public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) { 
            if (ENABLE_FPS_DUMP) { 
                long now = System.nanoTime(); 
                if (mFrameCountingStart == 0) { 
                    mFrameCountingStart = now; 
                } else if ((now - mFrameCountingStart) > 1000000000) { 
                    mFPS = (double) mFrameCount * 1000000000 / (now - mFrameCountingStart); 
                    Log.v(TAG, "fps: " + mFPS);