Revert "[Tizen] Add ShaderList for precompile"
authorTaehyub Kim <taehyub.kim@samsung.com>
Mon, 30 Oct 2023 08:36:03 +0000 (17:36 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Mon, 30 Oct 2023 08:36:03 +0000 (17:36 +0900)
This reverts commit 0d600480fe919f54cae471a74fb5429e7022a9c9.

dali/integration-api/shader-precompiler.cpp
dali/integration-api/shader-precompiler.h

index f897a70..ad8efcf 100644 (file)
@@ -30,7 +30,7 @@ std::unique_ptr<ShaderPrecompiler> ShaderPrecompiler::mInstance = nullptr;
 std::once_flag ShaderPrecompiler::mOnceFlag;
 
 ShaderPrecompiler::ShaderPrecompiler()
-: mRawShaderList(),
+: mRawShaderData(),
   mPrecompiled(false),
   mEnabled(false)
 {
@@ -44,7 +44,7 @@ ShaderPrecompiler& ShaderPrecompiler::Get()
   return *(mInstance.get());
 }
 
-void ShaderPrecompiler::GetPrecompileShaderList(std::vector<RawShaderData>& shaderList)
+void ShaderPrecompiler::GetPrecompileShaderList(RawShaderData& shaders)
 {
   ConditionalWait::ScopedLock lock(mConditionalWait);
   if(!IsReady())
@@ -54,14 +54,18 @@ void ShaderPrecompiler::GetPrecompileShaderList(std::vector<RawShaderData>& shad
   }
 
   // move shader list
-  shaderList = mRawShaderList;
+  shaders = mRawShaderData;
 }
 
-void ShaderPrecompiler::SavePrecomipleShaderList(std::vector<RawShaderData>& shaderList)
+void ShaderPrecompiler::SavePrecomipleShaderList(RawShaderData& shaders)
 {
   ConditionalWait::ScopedLock lock(mConditionalWait);
+  mRawShaderData.vertexPrefix = shaders.vertexPrefix;
+  mRawShaderData.fragmentPrefix = shaders.fragmentPrefix;
+  mRawShaderData.vertexShader = shaders.vertexShader;
+  mRawShaderData.fragmentShader = shaders.fragmentShader;
+  mRawShaderData.shaderCount = shaders.shaderCount;
 
-  mRawShaderList = shaderList;
   mPrecompiled = true;
   mConditionalWait.Notify(lock);
 }
index 1ad5ba7..1c2094b 100644 (file)
@@ -69,7 +69,7 @@ public:
    *  @SINCE_2_2.45
    *  @param[in] shaders shader data for precompile
   */
-  void GetPrecompileShaderList(std::vector<RawShaderData>& shaders);
+  void GetPrecompileShaderList(RawShaderData& shaders);
 
   /**
    * @brief Save the precompile shader list.
@@ -77,7 +77,7 @@ public:
    * @SINCE_2_2.45
    * @param[in] shaders shader data for precompile
   */
-  void SavePrecomipleShaderList(std::vector<RawShaderData>& shaders);
+  void SavePrecomipleShaderList(RawShaderData& shaders);
 
   /**
    * @brief Check precompile list is ready or not
@@ -116,7 +116,7 @@ public:
 private:
   static std::unique_ptr<ShaderPrecompiler> mInstance;
   static std::once_flag mOnceFlag;
-  std::vector<RawShaderData> mRawShaderList;
+  RawShaderData mRawShaderData;
   ConditionalWait mConditionalWait;
   bool mPrecompiled;
   bool mEnabled;