Revert "[Tizen] Apply Precompile shader"
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 26 Sep 2023 08:25:38 +0000 (17:25 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Tue, 26 Sep 2023 08:25:38 +0000 (17:25 +0900)
This reverts commit 95cc79c99fd976e0fbb51db61e037557abeb0561.

dali/internal/adaptor/common/combined-update-render-controller.cpp

index e164e85..648ef81 100644 (file)
@@ -20,7 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/platform-abstraction.h>
-#include <dali/integration-api/shader-precompiler.h>
 #include <errno.h>
 #include <unistd.h>
 #include "dali/public-api/common/dali-common.h"
@@ -45,7 +44,6 @@ namespace Adaptor
 {
 namespace
 {
-
 const unsigned int CREATED_THREAD_COUNT = 1u;
 
 const int CONTINUOUS = -1;
@@ -537,21 +535,6 @@ 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);
@@ -570,24 +553,6 @@ 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<numberOfPrecomipledShader; ++i)
-    {
-      auto vertexShader   = std::string(graphics.GetController().GetGlAbstraction().GetVertexShaderPrefix() + precompiledShader.vertexPrefix[i].data() + precompiledShader.vertexShader.data());
-      auto fragmentShader = std::string(graphics.GetController().GetGlAbstraction().GetFragmentShaderPrefix() + precompiledShader.fragmentPrefix[i].data() + precompiledShader.fragmentShader.data());
-      mCore.PreCompileShader(vertexShader.data(), fragmentShader.data());
-    }
-    DALI_LOG_RELEASE_INFO("ShaderPrecompiler[ENABLE], shader :%d \n",numberOfPrecomipledShader);
-  }
-  else
-  {
-    DALI_LOG_RELEASE_INFO("ShaderPrecompiler[DISABLE] \n");
-  }
-
   while(UpdateRenderReady(useElapsedTime, updateRequired, timeToSleepUntil))
   {
     LOG_UPDATE_RENDER_TRACE;
@@ -752,7 +717,7 @@ void CombinedUpdateRenderController::UpdateRenderThread()
     if(!uploadOnly || surfaceResized)
     {
       // Go through each window
-      windows.clear();
+      WindowContainer windows;
       mAdaptorInterfaces.GetWindowContainerInterface(windows);
 
       for(auto&& window : windows)
@@ -888,7 +853,7 @@ void CombinedUpdateRenderController::UpdateRenderThread()
   // Inform core of context destruction
   mCore.ContextDestroyed();
 
-  windows.clear();
+  WindowContainer windows;
   mAdaptorInterfaces.GetWindowContainerInterface(windows);
 
   // Destroy surfaces