RsCameraPreviewRenderer.java 文件源码

java
阅读 53 收藏 0 点赞 0 评论 0

项目:hella-renderscript 作者:
/**
 * Shut down the renderer when you're finished.
 */
@Override
@AnyThread
public void shutdown() {
    synchronized (this) {
        if (!isRunning()) {
            Log.d(TAG, "requesting shutdown...");
            renderHandler.removeCallbacks(this);
            renderHandler.postAtFrontOfQueue(() -> {
                Log.i(TAG, "shutting down");
                synchronized (this) {
                    droppedFrameLogger = null;
                    yuvInAlloc.destroy();
                    rgbInAlloc.destroy();
                    rgbOutAlloc.destroy();
                    yuvToRGBScript.destroy();
                    if (renderThread != null) {
                        renderThread.quitSafely();
                    }
                }
            });
            renderHandler = null;
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号