MCPcopy Create free account
hub / github.com/BabitMF/bmf / StartAlgorithm

Method StartAlgorithm

bmf_lite/ohos/entry/src/main/cpp/render/render_thread.cpp:114–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void 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
130void RenderThread::StopAlgorithm() {
131 OH_LOG_Print(LOG_APP, LOG_DEBUG, LOG_PRINT_DOMAIN, "RenderThread",

Callers 1

startAlgorithmMethod · 0.80

Calls 2

GetEGLDisplayMethod · 0.80
GetEGLContextMethod · 0.80

Tested by

no test coverage detected