From f5f5554841374422aaf9f306d40374720626aa86 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Tue, 26 Sep 2023 17:26:12 +0900 Subject: [PATCH] [Tizen] Apply Precompile shader This reverts commit 45d8529d30574244e669938ebd5a0b4e6d7383da. Change-Id: Ie89e56dd499fbe7ddd6fc334708d9db8fbca2ec6 --- .../common/combined-update-render-controller.cpp | 39 ++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/dali/internal/adaptor/common/combined-update-render-controller.cpp b/dali/internal/adaptor/common/combined-update-render-controller.cpp index 648ef81..e164e85 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.cpp +++ b/dali/internal/adaptor/common/combined-update-render-controller.cpp @@ -20,6 +20,7 @@ // EXTERNAL INCLUDES #include +#include #include #include #include "dali/public-api/common/dali-common.h" @@ -44,6 +45,7 @@ namespace Adaptor { namespace { + const unsigned int CREATED_THREAD_COUNT = 1u; const int CONTINUOUS = -1; @@ -535,6 +537,21 @@ void CombinedUpdateRenderController::UpdateRenderThread() NotifyThreadInitialised(); + // Initialize and create graphics resource for the shared context. + WindowContainer windows; + mAdaptorInterfaces.GetWindowContainerInterface(windows); + + for(auto&& window : windows) + { + Dali::Integration::Scene scene = window->GetScene(); + Dali::RenderSurfaceInterface* windowSurface = window->GetSurface(); + + if(scene && windowSurface) + { + windowSurface->InitializeGraphics(); + } + } + // Update time uint64_t lastFrameTime; TimeService::GetNanoseconds(lastFrameTime); @@ -553,6 +570,24 @@ void CombinedUpdateRenderController::UpdateRenderThread() const bool renderToFboEnabled = 0u != renderToFboInterval; unsigned int frameCount = 0u; + if(Integration::ShaderPrecompiler::Get().IsEnable()) + { + RawShaderData precompiledShader; + Integration::ShaderPrecompiler::Get().GetPrecompileShaderList(precompiledShader); + auto numberOfPrecomipledShader = precompiledShader.shaderCount; + for(int i= 0; i