Code example for SurfaceTexture

Methods: getTransformMatrix, updateTexImage

0
                    break; 
            } 
        } 
 
        private void doAlignFrame() { 
            mInputSurfaceTexture.updateTexImage();
            mInputSurfaceTexture.getTransformMatrix(mTransformMatrix);
 
            MosaicRenderer.setWarping(true); 
            // Call preprocess to render it to low-res and high-res RGB textures. 
            MosaicRenderer.preprocess(mTransformMatrix);
            // Now, transfer the textures from GPU to CPU memory for processing 
            MosaicRenderer.transferGPUtoCPU(); 
            MosaicRenderer.updateMatrix(); 
            draw(); 
            mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);
        } 
 
        private void doShowPreviewFrame() { 
            mInputSurfaceTexture.updateTexImage();
            mInputSurfaceTexture.getTransformMatrix(mTransformMatrix);