From: Eunki, Hong Date: Wed, 25 Oct 2023 07:41:34 +0000 (+0900) Subject: [Tizen] Apply Precompile shader X-Git-Tag: accepted/tizen/unified/20231031.163528~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44ab67e1d506987153eb6b4137c6839161dc4fdc;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [Tizen] Apply Precompile shader This reverts commit 60d893a7d63bc0d1856dffdbba8005e241cb07d7. Change-Id: Ib8f097f0edbe321b87a6697090f3976b2dcb7443 --- 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