[Tizen] Apply precompile shader
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / visual-factory-impl.cpp
index 7cc5119..07e1ec9 100644 (file)
@@ -393,6 +393,20 @@ void VisualFactory::DiscardVisual(Toolkit::Visual::Base visual)
   RegisterDiscardCallback();
 }
 
+void VisualFactory::UsePreCompiledShader()
+{
+  if(mPrecompiledShaderRequested)
+  {
+    return;
+  }
+  mPrecompiledShaderRequested = true;
+
+  RawShaderData rawShaderData;
+  Integration::ShaderPrecompiler::Get().Enable();
+  GetImageVisualShaderFactory().GetPrecompiledShader(rawShaderData);
+  Integration::ShaderPrecompiler::Get().SavePrecomipleShaderList(rawShaderData);
+}
+
 Internal::TextureManager& VisualFactory::GetTextureManager()
 {
   return GetFactoryCache().GetTextureManager();
@@ -431,6 +445,9 @@ Internal::VisualFactoryCache& VisualFactory::GetFactoryCache()
     }
     SetBrokenImageUrl(styleManager);
   }
+
+  //UsePreCompiledShader(); // Call forcelly
+
   return *mFactoryCache;
 }