// 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"
{
namespace
{
+
const unsigned int CREATED_THREAD_COUNT = 1u;
const int CONTINUOUS = -1;
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);
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;
if(!uploadOnly || surfaceResized)
{
// Go through each window
- WindowContainer windows;
+ windows.clear();
mAdaptorInterfaces.GetWindowContainerInterface(windows);
for(auto&& window : windows)
// Inform core of context destruction
mCore.ContextDestroyed();
- WindowContainer windows;
+ windows.clear();
mAdaptorInterfaces.GetWindowContainerInterface(windows);
// Destroy surfaces