From: EverLEEst(SangHyeon Lee) Date: Wed, 22 Nov 2023 05:11:29 +0000 (+0900) Subject: [Tizen] Add ShaderList for precompile X-Git-Tag: accepted/tizen/8.0/unified/20231123.173035~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=895748d251fdaca7333886f1be97c4ecef757485;p=platform%2Fcore%2Fuifw%2Fdali-core.git [Tizen] Add ShaderList for precompile This reverts commit 2f8b800fbd80851f1e36d329e3d439700230f3e7. --- diff --git a/dali/integration-api/shader-precompiler.cpp b/dali/integration-api/shader-precompiler.cpp index ad8efcf0c..f897a704a 100644 --- a/dali/integration-api/shader-precompiler.cpp +++ b/dali/integration-api/shader-precompiler.cpp @@ -30,7 +30,7 @@ std::unique_ptr ShaderPrecompiler::mInstance = nullptr; std::once_flag ShaderPrecompiler::mOnceFlag; ShaderPrecompiler::ShaderPrecompiler() -: mRawShaderData(), +: mRawShaderList(), mPrecompiled(false), mEnabled(false) { @@ -44,7 +44,7 @@ ShaderPrecompiler& ShaderPrecompiler::Get() return *(mInstance.get()); } -void ShaderPrecompiler::GetPrecompileShaderList(RawShaderData& shaders) +void ShaderPrecompiler::GetPrecompileShaderList(std::vector& shaderList) { ConditionalWait::ScopedLock lock(mConditionalWait); if(!IsReady()) @@ -54,18 +54,14 @@ void ShaderPrecompiler::GetPrecompileShaderList(RawShaderData& shaders) } // move shader list - shaders = mRawShaderData; + shaderList = mRawShaderList; } -void ShaderPrecompiler::SavePrecomipleShaderList(RawShaderData& shaders) +void ShaderPrecompiler::SavePrecomipleShaderList(std::vector& shaderList) { 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); } diff --git a/dali/integration-api/shader-precompiler.h b/dali/integration-api/shader-precompiler.h index 1c2094b3f..1ad5ba7c1 100644 --- a/dali/integration-api/shader-precompiler.h +++ b/dali/integration-api/shader-precompiler.h @@ -69,7 +69,7 @@ public: * @SINCE_2_2.45 * @param[in] shaders shader data for precompile */ - void GetPrecompileShaderList(RawShaderData& shaders); + void GetPrecompileShaderList(std::vector& 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(RawShaderData& shaders); + void SavePrecomipleShaderList(std::vector& shaders); /** * @brief Check precompile list is ready or not @@ -116,7 +116,7 @@ public: private: static std::unique_ptr mInstance; static std::once_flag mOnceFlag; - RawShaderData mRawShaderData; + std::vector mRawShaderList; ConditionalWait mConditionalWait; bool mPrecompiled; bool mEnabled;