Merge changes I84e1ce43,I76b93d51 into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / event / common / thread-local-storage.cpp
index 9286f45..627b668 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -30,18 +30,18 @@ namespace Internal
 
 namespace
 {
+#if defined(EMSCRIPTEN)
+ThreadLocalStorage* threadLocal = NULL;
+#else
 __thread ThreadLocalStorage* threadLocal = NULL;
+#endif
 }
 
 ThreadLocalStorage::ThreadLocalStorage(Core* core)
 : mCore( core )
-#ifdef DALI_DYNAMICS_SUPPORT
-, mDynamicsWorldInstance( NULL )
-#endif
 {
   DALI_ASSERT_ALWAYS( threadLocal == NULL && "Cannot create more than one ThreadLocalStorage object" );
 
-  // reset is used to store a new value associated with this thread
   threadLocal = this;
 }
 
@@ -51,12 +51,6 @@ ThreadLocalStorage::~ThreadLocalStorage()
 
 void ThreadLocalStorage::Remove()
 {
-#ifdef DALI_DYNAMICS_SUPPORT
-  if( mDynamicsWorldInstance )
-  {
-    mDynamicsWorldInstance.Reset();
-  }
-#endif
   threadLocal = NULL;
 }
 
@@ -78,18 +72,6 @@ ThreadLocalStorage* ThreadLocalStorage::GetInternal()
   return threadLocal;
 }
 
-#ifdef DALI_DYNAMICS_SUPPORT
-Dali::Internal::DynamicsWorldPtr ThreadLocalStorage::GetDynamicsWorldInstance()
-{
-  if( !mDynamicsWorldInstance )
-  {
-    // Create the instance if it doesn't exist.
-    mDynamicsWorldInstance = DynamicsWorld::New();
-  }
-  return mDynamicsWorldInstance;
-}
-#endif
-
 Dali::Integration::PlatformAbstraction& ThreadLocalStorage::GetPlatformAbstraction()
 {
   return mCore->GetPlatform();
@@ -105,21 +87,6 @@ NotificationManager& ThreadLocalStorage::GetNotificationManager()
   return mCore->GetNotificationManager();
 }
 
-ResourceManager& ThreadLocalStorage::GetResourceManager()
-{
-  return mCore->GetResourceManager();
-}
-
-ResourceClient& ThreadLocalStorage::GetResourceClient()
-{
-  return mCore->GetResourceClient();
-}
-
-ImageFactory& ThreadLocalStorage::GetImageFactory()
-{
-  return mCore->GetImageFactory();
-}
-
 ShaderFactory& ThreadLocalStorage::GetShaderFactory()
 {
   return mCore->GetShaderFactory();