| 112 | } |
| 113 | |
| 114 | void RenderThread::StartAlgorithm(AlgorithmEnum algorithm) { |
| 115 | OH_LOG_Print(LOG_APP, LOG_DEBUG, LOG_PRINT_DOMAIN, "RenderThread", |
| 116 | "StartAlgorithm."); |
| 117 | AlgorithmContext algorithmContext{renderContext_->GetEGLDisplay(), |
| 118 | renderContext_->GetEGLContext(), |
| 119 | eglSurface_, algorithm}; |
| 120 | PostTask([this, algorithmContext](EglRenderContext &renderContext) { |
| 121 | if (!algorithm_running_) { |
| 122 | algorithm_ = std::make_shared<Algorithm>( |
| 123 | algorithmContext.egl_display, algorithmContext.egl_surface, |
| 124 | algorithmContext.egl_context, algorithmContext.algorithm); |
| 125 | algorithm_running_ = true; |
| 126 | } |
| 127 | }); |
| 128 | } |
| 129 | |
| 130 | void RenderThread::StopAlgorithm() { |
| 131 | OH_LOG_Print(LOG_APP, LOG_DEBUG, LOG_PRINT_DOMAIN, "RenderThread", |
no test coverage detected