lottie: final changes to rename from lottie-player to rlottie 44/198344/2 submit/tizen/20190124.051235
authorsubhransu mohanty <sub.mohanty@samsung.com>
Thu, 24 Jan 2019 02:28:50 +0000 (11:28 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Thu, 24 Jan 2019 04:20:54 +0000 (13:20 +0900)
Change-Id: Ie2ed4d7c3fb08abd3f8fe484021d478e90bc9d91

13 files changed:
CMakeLists.txt
example/lottieview.cpp
example/lottieview.h
inc/lottieanimation.h [deleted file]
inc/meson.build
inc/rlottie.h
packaging/rlottie.spec
rlottie.manifest [deleted file]
src/binding/c/lottieanimation_capi.cpp
src/lottie/lottieanimation.cpp
src/lottie/lottieitem.cpp
src/lottie/lottieitem.h
test/test_lottieanimation.cpp

index 4249b0f..0e164d5 100644 (file)
@@ -56,17 +56,12 @@ SET(INCDIR ${PREFIX}/include)
 CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc)
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 
-#temporary for lottie-player dependency.
-CONFIGURE_FILE(${PROJECT_NAME}.pc.in lottie-player.pc)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lottie-player.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-
 
 #install header
 install(FILES
         inc/rlottie.h
         inc/rlottie_capi.h
         inc/rlottiecommon.h
-        inc/lottieanimation.h
         DESTINATION include)
 
 #install lib
index a09417a..7671735 100644 (file)
@@ -18,7 +18,7 @@
 
 #include"lottieview.h"
 
-using namespace lottie;
+using namespace rlottie;
 
 static Eina_Bool
 animator(void *data , double pos)
@@ -321,14 +321,14 @@ void LottieView::seek(float pos)
             mDirty = true;
             auto buffer = (uint32_t *)evas_object_image_data_get(mImage, EINA_TRUE);
             size_t bytesperline =  evas_object_image_stride_get(mImage);
-            lottie::Surface surface(buffer, width, height, bytesperline);
+            rlottie::Surface surface(buffer, width, height, bytesperline);
             mRenderTask = mPlayer->render(mCurFrame, surface);
             // to force a redraw
             evas_object_image_data_update_add(mImage, 0 , 0, surface.width(), surface.height());
         } else {
             auto buffer = (uint32_t *)evas_object_image_data_get(mImage, EINA_TRUE);
             size_t bytesperline =  evas_object_image_stride_get(mImage);
-            lottie::Surface surface(buffer, width, height, bytesperline);
+            rlottie::Surface surface(buffer, width, height, bytesperline);
             mPlayer->renderSync(mCurFrame, surface);
             evas_object_image_data_set(mImage, surface.buffer());
             evas_object_image_data_update_add(mImage, 0 , 0, surface.width(), surface.height());
index aab0336..1ff8266 100644 (file)
@@ -108,7 +108,7 @@ public:
     Evas_Object             *mVg;
     int                      mRepeatCount;
     LottieView::RepeatMode   mRepeatMode;
-    std::unique_ptr<lottie::Animation>       mPlayer;
+    std::unique_ptr<rlottie::Animation>       mPlayer;
     size_t                   mCurFrame{UINT_MAX};
     Ecore_Animator          *mAnimator{nullptr};
     bool                     mLoop;
@@ -123,7 +123,7 @@ public:
     float                    mPos;
     float                    mFrameRate;
     long                     mTotalFrame;
-    std::future<lottie::Surface>        mRenderTask;
+    std::future<rlottie::Surface>        mRenderTask;
 
     //keep a segment of the animation default is [0, 1]
     float                   mMinProgress{0};
diff --git a/inc/lottieanimation.h b/inc/lottieanimation.h
deleted file mode 100644 (file)
index 1508b2f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "rlottie.h"
\ No newline at end of file
index 7853c2e..0349fac 100644 (file)
@@ -2,5 +2,4 @@ install_headers([
                  'rlottie.h',
                  'rlottie_capi.h',
                  'rlottiecommon.h',
-                 'lottieanimation.h',
                 ])
index 47aa4e2..7821641 100644 (file)
@@ -49,7 +49,7 @@ class AnimationImpl;
 struct LOTNode;
 struct LOTLayerNode;
 
-namespace lottie {
+namespace rlottie {
 
 class LOT_EXPORT Surface {
 public:
index 122ce8b..1a343db 100644 (file)
@@ -1,4 +1,4 @@
-Name:       rlottie
+Name:       lotti-player
 Summary:    rlottie ibrary
 Version:    0.0.1
 Release:    1
@@ -55,7 +55,7 @@ make %{?jobs:-j%jobs}
 %files
 %defattr(-,root,root,-)
 %{_libdir}/librlottie.so.*
-%manifest %{name}.manifest
+%manifest packaging/rlottie.manifest
 %license COPYING licenses/COPYING*
 
 %files devel
@@ -64,5 +64,4 @@ make %{?jobs:-j%jobs}
 %{_libdir}/librlottie.so
 
 %{_libdir}/cmake/rlottie/*.cmake
-%{_libdir}/pkgconfig/lottie-player.pc
 %{_libdir}/pkgconfig/rlottie.pc
diff --git a/rlottie.manifest b/rlottie.manifest
deleted file mode 100644 (file)
index 017d22d..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<manifest>
- <request>
-    <domain name="_"/>
- </request>
-</manifest>
index 6748f20..dd7f5e1 100644 (file)
@@ -19,7 +19,7 @@
 #include "rlottie.h"
 #include "vdebug.h"
 
-using namespace lottie;
+using namespace rlottie;
 
 extern "C" {
 
@@ -117,7 +117,7 @@ lottie_animation_render_async(Lottie_Animation_S *animation,
 {
     if (!animation) return;
 
-    lottie::Surface surface(buffer, width, height, bytes_per_line);
+    rlottie::Surface surface(buffer, width, height, bytes_per_line);
     animation->mRenderTask = animation->mAnimation->render(frame_number, surface);
     animation->mBufferRef = buffer;
 }
index 1f041f8..1084a23 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <fstream>
 
-using namespace lottie;
+using namespace rlottie;
 
 struct RenderTask {
     RenderTask() { receiver = sender.get_future(); }
index aa88896..3cd78fd 100644 (file)
@@ -121,7 +121,7 @@ const LOTLayerNode * LOTCompItem::renderTree() const
     return mRootLayer->layerNode();
 }
 
-bool LOTCompItem::render(const lottie::Surface &surface)
+bool LOTCompItem::render(const rlottie::Surface &surface)
 {
     VBitmap bitmap(reinterpret_cast<uchar *>(surface.buffer()),
                    surface.width(), surface.height(),
index b38a379..9eda6d1 100644 (file)
@@ -56,7 +56,7 @@ public:
    VSize size() const;
    void buildRenderTree();
    const LOTLayerNode * renderTree()const;
-   bool render(const lottie::Surface &surface);
+   bool render(const rlottie::Surface &surface);
 private:
    VMatrix                                    mScaleMatrix;
    VSize                                      mViewSize;
index 7b08b4f..d704fb4 100644 (file)
@@ -5,10 +5,10 @@ class AnimationTest : public ::testing::Test {
 public:
     void SetUp()
     {
-        animationInvalid = lottie::Animation::loadFromFile("wrong_file.json");
+        animationInvalid = rlottie::Animation::loadFromFile("wrong_file.json");
         std::string filePath = DEMO_DIR;
         filePath +="mask.json";
-        animation = lottie::Animation::loadFromFile(filePath);
+        animation = rlottie::Animation::loadFromFile(filePath);
 
     }
     void TearDown()
@@ -16,8 +16,8 @@ public:
 
     }
 public:
-    std::unique_ptr<lottie::Animation> animationInvalid;
-    std::unique_ptr<lottie::Animation> animation;
+    std::unique_ptr<rlottie::Animation> animationInvalid;
+    std::unique_ptr<rlottie::Animation> animation;
 };
 
 TEST_F(AnimationTest, loadFromFile_N) {