Revert "vector-animation: Imeplements rive animation" 68/260068/2
authorHeeyong Song <heeyong.song@samsung.com>
Fri, 18 Jun 2021 05:12:39 +0000 (14:12 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Fri, 25 Jun 2021 02:08:29 +0000 (02:08 +0000)
This reverts commit 8d1b39209d68a013f936d5233b9358b5ca06edb6.

Change-Id: I3eb922ec50afe6756bd668734c53dbede53623f6

dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.cpp
dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.h

index bee8d9a..78b747a 100644 (file)
@@ -32,8 +32,6 @@ namespace
 {
 // The default plugin name
 const char* DEFAULT_OBJECT_NAME("libdali2-vector-animation-renderer-plugin.so");
-// The rive animation plugin name
-const char* RIVE_OBJECT_NAME("libdali2-rive-animation-renderer-plugin.so");
 
 } // namespace
 
@@ -52,6 +50,8 @@ VectorAnimationRendererPluginProxy::VectorAnimationRendererPluginProxy(const std
   {
     mSharedObjectName = DEFAULT_OBJECT_NAME;
   }
+
+  Initialize();
 }
 
 VectorAnimationRendererPluginProxy::~VectorAnimationRendererPluginProxy()
@@ -68,25 +68,8 @@ VectorAnimationRendererPluginProxy::~VectorAnimationRendererPluginProxy()
   }
 }
 
-void VectorAnimationRendererPluginProxy::Initialize(AnimationFormat format)
+void VectorAnimationRendererPluginProxy::Initialize()
 {
-  // initialization should be once
-  if(mPlugin)
-  {
-    return;
-  }
-
-  if(format == AnimationFormat::RIVE)
-  {
-    // for Rive
-    mSharedObjectName = RIVE_OBJECT_NAME;
-  }
-  else
-  {
-    // for Json
-    mSharedObjectName = DEFAULT_OBJECT_NAME;
-  }
-
   mLibHandle = dlopen(mSharedObjectName.c_str(), RTLD_LAZY);
 
   char* error = dlerror();
@@ -124,19 +107,6 @@ void VectorAnimationRendererPluginProxy::Finalize()
 
 bool VectorAnimationRendererPluginProxy::Load(const std::string& url)
 {
-  AnimationFormat format;
-  std::string     extensionName = url.substr(url.find_last_of(".") + 1);
-  if(extensionName == "riv")
-  {
-    format = AnimationFormat::RIVE;
-  }
-  else
-  {
-    format = AnimationFormat::JSON;
-  }
-
-  Initialize(format);
-
   if(mPlugin)
   {
     return mPlugin->Load(url);
index b5002fc..ef4f016 100644 (file)
@@ -111,19 +111,9 @@ public:
 
 private:
   /**
-   * Vector Animation formats.
-   */
-  enum class AnimationFormat
-  {
-    NONE = 0,
-    JSON,
-    RIVE
-  };
-
-  /**
    * Dynamically loads the plugin.
    */
-  void Initialize(AnimationFormat format);
+  void Initialize();
 
 private:
   using CreateVectorAnimationRendererFunction = Dali::VectorAnimationRendererPlugin* (*)();