Code example for Allocation

Methods: setSurfaceTexture

0
 
        public void onSurfaceTextureUpdated(SurfaceTexture surface) {
        } 
 
        public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
            mOutPixelsAllocation.setSurfaceTexture(surface);
        } 
 
        public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
            mOutPixelsAllocation.setSurfaceTexture(surface);
            filterAlloc(mOutPixelsAllocation, mSampler);
        } 
 
        public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
            mOutPixelsAllocation.setSurfaceTexture(null);
            return true; 
        } 
    } 
 
    private final String TAG = "Img";
    private Bitmap mBitmapTwoByTwo;