diff --git a/entry/src/main/cpp/NativeEGLOCCT/OCCTMgr/RenderThread.cpp b/entry/src/main/cpp/NativeEGLOCCT/OCCTMgr/RenderThread.cpp index ca80c280..23b0573f 100644 --- a/entry/src/main/cpp/NativeEGLOCCT/OCCTMgr/RenderThread.cpp +++ b/entry/src/main/cpp/NativeEGLOCCT/OCCTMgr/RenderThread.cpp @@ -92,7 +92,7 @@ void RenderThread::renderLoop() { initFontMgr(); eglSubCore=new EGLSubCore(); eglSubCore->InitEGLSubCore(thrInfo.eglCore->GetEGLDisplay(), thrInfo.eglCore->GetEGLConfig(), thrInfo.win); - Render* render=new Render(thrInfo.width,thrInfo.height); + render=new Render(thrInfo.width,thrInfo.height); if (render->init(thrInfo.eglCore->GetEGLDisplay(),eglSubCore->eglCtx,thrInfo.eglCore->GetEGLConfig())) { OH_LOG_Print(LOG_APP, LOG_ERROR, LOG_PRINT_DOMAIN, "NativeRenderInit ","Render Init Done"); }else{ @@ -178,11 +178,7 @@ void RenderThread::loadModel(const std::string& filePath) { void RenderThread::setRotation(float xAngle, float yAngle) { std::lock_guard lock(commandMutex_); - RenderCommand cmd(CMD_SET_ROTATION); - cmd.param2 = xAngle; - cmd.param3 = yAngle; - commandQueue_.push(cmd); - commandCondition_.notify_one(); + render->setRotation(xAngle,yAngle); } void RenderThread::setTranslation(float x, float y) { diff --git a/entry/src/main/cpp/NativeEGLOCCT/OCCTMgr/RenderThread.h b/entry/src/main/cpp/NativeEGLOCCT/OCCTMgr/RenderThread.h index d764cee8..b7924b68 100644 --- a/entry/src/main/cpp/NativeEGLOCCT/OCCTMgr/RenderThread.h +++ b/entry/src/main/cpp/NativeEGLOCCT/OCCTMgr/RenderThread.h @@ -78,7 +78,6 @@ private: }; std::queue commandQueue_; - std::mutex callbackMutex_; Callback renderCompleteCallback_; Handle(Font_FontMgr) ftMgr ;