Java Code Examples for android.graphics.SurfaceTexture.release()

The following are Jave code examples for showing how to use release() of the android.graphics.SurfaceTexture class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: mpeg-encoder   File: GLToolsAndroidTest.java   Source Code and License Vote up 6 votes
/**
 * Test for {@link GLTools#setPresentationTime(EGLDisplay, EGLSurface, long)} .
 * @throws Exception by some fails
 */
@Test
public final void testSetPresentationTime() throws Exception {
    final EGLDisplay eglDisplay = GLTools.newDisplay();
    final EGLConfig eglConfig = GLTools.newConfig(eglDisplay, true);
    final EGLContext eglContext = GLTools.newContext(eglDisplay, eglConfig);
    final EGLSurface eglSurface =
            GLTools.newSurface(eglDisplay, eglConfig, FRAME_SIZE, FRAME_SIZE);
    GLTools.makeCurrent(eglDisplay, eglSurface, eglContext);

    final int txt = GLTools.newTexture(TEXTURE_LEVEL);
    final SurfaceTexture surfaceTexture = new SurfaceTexture(txt, true);
    final Surface surface = new Surface(surfaceTexture);
    final EGLSurface window = GLTools.newSurface(eglDisplay, eglConfig, surface);

    GLTools.setPresentationTime(eglDisplay, window, PRESENTATION_TIME);

    GLTools.closeSurface(eglDisplay, window);
    surface.release();
    surfaceTexture.release();
    GLTools.closeTexture(txt, TEXTURE_LEVEL);

    GLTools.closeSurface(eglDisplay, eglSurface);
    GLTools.closeContext(eglDisplay, eglContext);
    GLTools.closeDisplay(eglDisplay);
}
 
Example 2
Project: GitHub   File: TextureRenderView.java   Source Code and License Vote up 5 votes
@Override
public void releaseSurfaceTexture(SurfaceTexture surfaceTexture) {
    if (surfaceTexture == null) {
        Log.d(TAG, "releaseSurfaceTexture: null");
    } else if (mDidDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release detached SurfaceTexture");
            surfaceTexture.release();
        } else {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): already released by TextureView");
        }
    } else if (mWillDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): will released by TextureView");
        }
    } else {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: alive: will released by TextureView");
        }
    }
}
 
Example 3
Project: mpeg-encoder   File: GLToolsAndroidTest.java   Source Code and License Vote up 5 votes
/**
 * Test for {@link GLTools#swapBuffers(EGLDisplay, EGLSurface)}.
 * @throws Exception by some fails
 */
@Test
public final void testSwapBuffers() throws Exception {
    final EGLDisplay eglDisplay = GLTools.newDisplay();
    final EGLConfig eglConfig = GLTools.newConfig(eglDisplay, true);
    final EGLContext eglContext = GLTools.newContext(eglDisplay, eglConfig);
    final EGLSurface eglSurface =
            GLTools.newSurface(eglDisplay, eglConfig, FRAME_SIZE, FRAME_SIZE);
    GLTools.makeCurrent(eglDisplay, eglSurface, eglContext);
    try {
        GLTools.swapBuffers(eglDisplay, eglSurface);
    } catch (RuntimeException exception) {

        final int txt = GLTools.newTexture(TEXTURE_LEVEL);
        final SurfaceTexture surfaceTexture = new SurfaceTexture(txt, true);
        final Surface surface = new Surface(surfaceTexture);
        final EGLSurface window = GLTools.newSurface(eglDisplay, eglConfig, surface);

        GLTools.makeCurrent(eglDisplay, window, eglContext);
        GLTools.swapBuffers(eglDisplay, window);

        GLTools.closeSurface(eglDisplay, window);
        surface.release();
        surfaceTexture.release();
        GLTools.closeTexture(txt, TEXTURE_LEVEL);
    }

    GLTools.closeSurface(eglDisplay, eglSurface);
    GLTools.closeContext(eglDisplay, eglContext);
    GLTools.closeDisplay(eglDisplay);
}
 
Example 4
Project: PaoMovie   File: GifTextureView.java   Source Code and License Vote up 5 votes
@Override
protected void onDetachedFromWindow() {
	mRenderThread.dispose();
	super.onDetachedFromWindow();
	final SurfaceTexture surfaceTexture = getSurfaceTexture();
	if (surfaceTexture != null) {
		surfaceTexture.release();
	}
}
 
Example 5
Project: PaoMovie   File: GifTextureView.java   Source Code and License Vote up 5 votes
@Override
protected void onDetachedFromWindow() {
	mRenderThread.dispose();
	super.onDetachedFromWindow();
	final SurfaceTexture surfaceTexture = getSurfaceTexture();
	if (surfaceTexture != null) {
		surfaceTexture.release();
	}
}
 
Example 6
Project: Agora-Screen-Sharing-Android   File: GLRender.java   Source Code and License Vote up 5 votes
private void releaseGlSurface(SurfaceTexture st) {
    if (st != null) {
        st.release();
    }

    if (mWindowSurface != null) {
        mWindowSurface.release();
        mWindowSurface = null;
    }

    if (mEglCore != null) {
        mEglCore.release();
        mEglCore = null;
    }
}
 
Example 7
Project: MVideo   File: TextureRenderView.java   Source Code and License Vote up 5 votes
@Override
public void releaseSurfaceTexture(SurfaceTexture surfaceTexture) {
    if (surfaceTexture == null) {
        Log.d(TAG, "releaseSurfaceTexture: null");
    } else if (mDidDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release detached SurfaceTexture");
            surfaceTexture.release();
        } else {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): already released by TextureView");
        }
    } else if (mWillDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): will released by TextureView");
        }
    } else {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: alive: will released by TextureView");
        }
    }
}
 
Example 8
Project: GestureVideoView   File: TextureRenderView.java   Source Code and License Vote up 5 votes
@Override
public void releaseSurfaceTexture(SurfaceTexture surfaceTexture) {
    if (surfaceTexture == null) {
        Log.d(TAG, "releaseSurfaceTexture: null");
    } else if (mDidDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release detached SurfaceTexture");
            surfaceTexture.release();
        } else {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): already released by TextureView");
        }
    } else if (mWillDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): will released by TextureView");
        }
    } else {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: alive: will released by TextureView");
        }
    }
}
 
Example 9
Project: ShaddockVideoPlayer   File: TextureRenderView.java   Source Code and License Vote up 5 votes
@Override
public void releaseSurfaceTexture(SurfaceTexture surfaceTexture) {
    if (surfaceTexture == null) {
        Log.d(TAG, "releaseSurfaceTexture: null");
    } else if (mDidDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release detached SurfaceTexture");
            surfaceTexture.release();
        } else {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): already released by TextureView");
        }
    } else if (mWillDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): will released by TextureView");
        }
    } else {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: alive: will released by TextureView");
        }
    }
}
 
Example 10
Project: BLPlayer   File: TextureRenderView.java   Source Code and License Vote up 5 votes
@Override
public void releaseSurfaceTexture(SurfaceTexture surfaceTexture) {
    if (surfaceTexture == null) {
        Log.d(TAG, "releaseSurfaceTexture: null");
    } else if (mDidDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release detached SurfaceTexture");
            surfaceTexture.release();
        } else {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): already released by TextureView");
        }
    } else if (mWillDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): will released by TextureView");
        }
    } else {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: alive: will released by TextureView");
        }
    }
}
 
Example 11
Project: PlayerBase   File: TextureRenderView.java   Source Code and License Vote up 5 votes
@Override
public void releaseSurfaceTexture(SurfaceTexture surfaceTexture) {
    if (surfaceTexture == null) {
        Log.d(TAG, "releaseSurfaceTexture: null");
    } else if (mDidDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release detached SurfaceTexture");
            surfaceTexture.release();
        } else {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): already released by TextureView");
        }
    } else if (mWillDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): will released by TextureView");
        }
    } else {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: alive: will released by TextureView");
        }
    }
}
 
Example 12
Project: Idea-ijkplayer   File: TextureRenderView.java   Source Code and License Vote up 5 votes
@Override
public void releaseSurfaceTexture(SurfaceTexture surfaceTexture) {
    if (surfaceTexture == null) {
        Log.d(TAG, "releaseSurfaceTexture: null");
    } else if (mDidDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release detached SurfaceTexture");
            surfaceTexture.release();
        } else {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): already released by TextureView");
        }
    } else if (mWillDetachFromWindow) {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): will released by TextureView");
        }
    } else {
        if (surfaceTexture != mSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: release different SurfaceTexture");
            surfaceTexture.release();
        } else if (!mOwnSurfaceTexture) {
            Log.d(TAG, "releaseSurfaceTexture: alive: re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        } else {
            Log.d(TAG, "releaseSurfaceTexture: alive: will released by TextureView");
        }
    }
}
 
Example 13
Project: MyFire   File: JCVideoPlayer.java   Source Code and License Vote up 4 votes
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
    surface.release();
    return true;
}
 
Example 14
Project: grafika   File: TextureViewGLActivity.java   Source Code and License Vote up 4 votes
@Override
public void run() {
    while (true) {
        SurfaceTexture surfaceTexture = null;

        // Latch the SurfaceTexture when it becomes available.  We have to wait for
        // the TextureView to create it.
        synchronized (mLock) {
            while (!mDone && (surfaceTexture = mSurfaceTexture) == null) {
                try {
                    mLock.wait();
                } catch (InterruptedException ie) {
                    throw new RuntimeException(ie);     // not expected
                }
            }
            if (mDone) {
                break;
            }
        }
        Log.d(TAG, "Got surfaceTexture=" + surfaceTexture);

        // Create an EGL surface for our new SurfaceTexture.  We're not on the same
        // thread as the SurfaceTexture, which is a concern for the *consumer*, which
        // wants to call updateTexImage().  Because we're the *producer*, i.e. the
        // one generating the frames, we don't need to worry about being on the same
        // thread.
        mEglCore = new EglCore(null, EglCore.FLAG_TRY_GLES3);
        WindowSurface windowSurface = new WindowSurface(mEglCore, mSurfaceTexture);
        windowSurface.makeCurrent();

        // Render frames until we're told to stop or the SurfaceTexture is destroyed.
        doAnimation(windowSurface);

        windowSurface.release();
        mEglCore.release();
        if (!sReleaseInCallback) {
            Log.i(TAG, "Releasing SurfaceTexture in renderer thread");
            surfaceTexture.release();
        }
    }

    Log.d(TAG, "Renderer thread exiting");
}
 
Example 15
Project: AndroidTvDemo   File: TextureRenderView.java   Source Code and License Vote up 4 votes
@Override
public void releaseSurfaceTexture(SurfaceTexture surfaceTexture)
{
    if (surfaceTexture == null)
    {
        Log.d(TAG, "releaseSurfaceTexture: null");
    }
    else if (mDidDetachFromWindow)
    {
        if (surfaceTexture != mSurfaceTexture)
        {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        }
        else if (!mOwnSurfaceTexture)
        {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): release detached SurfaceTexture");
            surfaceTexture.release();
        }
        else
        {
            Log.d(TAG, "releaseSurfaceTexture: didDetachFromWindow(): already released by TextureView");
        }
    }
    else if (mWillDetachFromWindow)
    {
        if (surfaceTexture != mSurfaceTexture)
        {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): release different SurfaceTexture");
            surfaceTexture.release();
        }
        else if (!mOwnSurfaceTexture)
        {
            Log.d(TAG,
                "releaseSurfaceTexture: willDetachFromWindow(): re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        }
        else
        {
            Log.d(TAG, "releaseSurfaceTexture: willDetachFromWindow(): will released by TextureView");
        }
    }
    else
    {
        if (surfaceTexture != mSurfaceTexture)
        {
            Log.d(TAG, "releaseSurfaceTexture: alive: release different SurfaceTexture");
            surfaceTexture.release();
        }
        else if (!mOwnSurfaceTexture)
        {
            Log.d(TAG, "releaseSurfaceTexture: alive: re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        }
        else
        {
            Log.d(TAG, "releaseSurfaceTexture: alive: will released by TextureView");
        }
    }
}
 
Example 16
Project: boohee_v5.6   File: TextureRenderView.java   Source Code and License Vote up 4 votes
public void releaseSurfaceTexture(SurfaceTexture surfaceTexture) {
    if (surfaceTexture == null) {
        Log.d(TextureRenderView.TAG, "releaseSurfaceTexture: null");
    } else if (this.mDidDetachFromWindow) {
        if (surfaceTexture != this.mSurfaceTexture) {
            Log.d(TextureRenderView.TAG, "releaseSurfaceTexture: didDetachFromWindow(): " +
                    "release different SurfaceTexture");
            surfaceTexture.release();
        } else if (this.mOwnSurfaceTexture) {
            Log.d(TextureRenderView.TAG, "releaseSurfaceTexture: didDetachFromWindow(): " +
                    "already released by TextureView");
        } else {
            Log.d(TextureRenderView.TAG, "releaseSurfaceTexture: didDetachFromWindow(): " +
                    "release detached SurfaceTexture");
            surfaceTexture.release();
        }
    } else if (this.mWillDetachFromWindow) {
        if (surfaceTexture != this.mSurfaceTexture) {
            Log.d(TextureRenderView.TAG, "releaseSurfaceTexture: willDetachFromWindow(): " +
                    "release different SurfaceTexture");
            surfaceTexture.release();
        } else if (this.mOwnSurfaceTexture) {
            Log.d(TextureRenderView.TAG, "releaseSurfaceTexture: willDetachFromWindow(): " +
                    "will released by TextureView");
        } else {
            Log.d(TextureRenderView.TAG, "releaseSurfaceTexture: willDetachFromWindow(): " +
                    "re-attach SurfaceTexture to TextureView");
            setOwnSurfaceTexture(true);
        }
    } else if (surfaceTexture != this.mSurfaceTexture) {
        Log.d(TextureRenderView.TAG, "releaseSurfaceTexture: alive: release different " +
                "SurfaceTexture");
        surfaceTexture.release();
    } else if (this.mOwnSurfaceTexture) {
        Log.d(TextureRenderView.TAG, "releaseSurfaceTexture: alive: will released by " +
                "TextureView");
    } else {
        Log.d(TextureRenderView.TAG, "releaseSurfaceTexture: alive: re-attach " +
                "SurfaceTexture to TextureView");
        setOwnSurfaceTexture(true);
    }
}
 
Example 17
Project: RNLearn_Project1   File: FlatARTSurfaceViewShadowNode.java   Source Code and License Vote up 4 votes
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
  surface.release();
  mSurface = null;
  return true;
}
 
Example 18
Project: RNLearn_Project1   File: ARTSurfaceViewShadowNode.java   Source Code and License Vote up 4 votes
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
  surface.release();
  mSurface = null;
  return true;
}
 
Example 19
Project: RNLearn_Project1   File: FlatARTSurfaceViewShadowNode.java   Source Code and License Vote up 4 votes
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
  surface.release();
  mSurface = null;
  return true;
}
 
Example 20
Project: RNLearn_Project1   File: ARTSurfaceViewShadowNode.java   Source Code and License Vote up 4 votes
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
  surface.release();
  mSurface = null;
  return true;
}