Revert "lottie: rename lottie-player to rlottie for cmake and gbs build, update names... accepted/tizen/unified/20190128.061629 submit/tizen/20190123.060112
authorHermet Park <hermetpark@gmail.com>
Wed, 23 Jan 2019 05:46:34 +0000 (14:46 +0900)
committerHermet Park <hermetpark@gmail.com>
Wed, 23 Jan 2019 05:46:34 +0000 (14:46 +0900)
This reverts commit 569f16a7e999ad697008900948192b13c0e27f4f.

24 files changed:
CMakeLists.txt
COPYING
README.txt
cmake/lottie-playerConfig.cmake.in [new file with mode: 0644]
cmake/rlottieConfig.cmake.in [deleted file]
example/lottieview.cpp
example/lottieview.h
inc/CMakeLists.txt
inc/rlottie.h
lottie-player.manifest [moved from packaging/rlottie.manifest with 100% similarity]
lottie-player.pc.in [new file with mode: 0644]
packaging/lottie-player.manifest [new file with mode: 0644]
packaging/lottie-player.spec [moved from packaging/rlottie.spec with 76% similarity]
rlottie.pc.in [deleted file]
src/binding/c/CMakeLists.txt
src/binding/c/lottieanimation_capi.cpp
src/lottie/CMakeLists.txt
src/lottie/lottieanimation.cpp
src/lottie/lottieitem.cpp
src/lottie/lottieitem.h
src/vector/CMakeLists.txt
src/vector/freetype/CMakeLists.txt
src/vector/pixman/CMakeLists.txt
test/test_lottieanimation.cpp

index facf8e7..38a8a7a 100644 (file)
@@ -1,26 +1,26 @@
 cmake_minimum_required( VERSION 3.2 )
 
 #declare project
-project( rlottie VERSION 0.0.1 LANGUAGES C CXX ASM)
+project( lottie-player VERSION 0.0.1 LANGUAGES C CXX ASM)
 
 #declare target
-add_library( rlottie SHARED  "" )
+add_library( lottie-player SHARED  "" )
 
 #declare version of the target
-set(rlottie_version_major 0)
-set(rlottie_version_minor 0)
-set(rlottie_version_patch 1)
-set(rlottie_version ${rlottie_version_major}.${rlottie_version_minor}.${rlottie_version_patch} )
-set_target_properties(rlottie PROPERTIES
-                        VERSION    ${rlottie_version}
-                        SOVERSION  ${rlottie_version_major}
+set(player_version_major 0)
+set(player_version_minor 0)
+set(player_version_patch 1)
+set(player_version ${player_version_major}.${player_version_minor}.${player_version_patch} )
+set_target_properties(lottie-player PROPERTIES
+                        VERSION    ${player_version}
+                        SOVERSION  ${player_version_major}
                       )
 
 #declare alias so that library can be used inside the build tree, e.g. when testing
-add_library(rlottie::rlottie ALIAS rlottie)
+add_library(lottie-player::lottie-player ALIAS lottie-player)
 
 #declare target compilation options
-target_compile_options(rlottie
+target_compile_options(lottie-player
                     PUBLIC
                         -std=c++14
                     PRIVATE
@@ -30,17 +30,17 @@ target_compile_options(rlottie
 set( CMAKE_THREAD_PREFER_PTHREAD TRUE )
 find_package( Threads )
 
-target_link_libraries(rlottie
+target_link_libraries(lottie-player
                     PUBLIC
                         "${CMAKE_THREAD_LIBS_INIT}"
                      )
 
 # for dlopen, dlsym and dlclose dependancy
-target_link_libraries(rlottie
+target_link_libraries(lottie-player
                     PRIVATE
                     ${CMAKE_DL_LIBS})
 
-target_link_libraries(rlottie
+target_link_libraries(lottie-player
                     PUBLIC
                          "-Wl,--no-undefined"
                       )
@@ -67,7 +67,7 @@ install(FILES
         DESTINATION include)
 
 #install lib
-install( TARGETS rlottie EXPORT rlottie-targets
+install( TARGETS lottie-player EXPORT lottie-player-targets
          LIBRARY     DESTINATION    ${LIB_INSTALL_DIR}
          ARCHIVE     DESTINATION    ${LIB_INSTALL_DIR}
          INCLUDES    DESTINATION    include
@@ -75,36 +75,36 @@ install( TARGETS rlottie EXPORT rlottie-targets
 
 #install config file.
 
-install( EXPORT rlottie-targets
-         FILE          rlottieTargets.cmake
-         NAMESPACE     rlottie::
-         DESTINATION   ${LIB_INSTALL_DIR}/cmake/rlottie
+install( EXPORT lottie-player-targets
+         FILE          lottie-playerTargets.cmake
+         NAMESPACE     lottie-player::
+         DESTINATION   ${LIB_INSTALL_DIR}/cmake/lottie-player
        )
 
 
 #Create a ConfigVersion.cmake file
 include(CMakePackageConfigHelpers)
 write_basic_package_version_file(
-    ${CMAKE_CURRENT_BINARY_DIR}/rlottieConfigVersion.cmake
+    ${CMAKE_CURRENT_BINARY_DIR}/lottie-playerConfigVersion.cmake
     VERSION ${PROJECT_VERSION}
     COMPATIBILITY AnyNewerVersion
 )
 
-configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/cmake/rlottieConfig.cmake.in
-    ${CMAKE_CURRENT_BINARY_DIR}/rlottieConfig.cmake
-    INSTALL_DESTINATION ${LIB_INSTALL_DIR}/cmake/rlottie
+configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/cmake/lottie-playerConfig.cmake.in
+    ${CMAKE_CURRENT_BINARY_DIR}/lottie-playerConfig.cmake
+    INSTALL_DESTINATION ${LIB_INSTALL_DIR}/cmake/lottie-player
 )
 
 #Install the config, configversion and custom find modules
 install(FILES
-    ${CMAKE_CURRENT_BINARY_DIR}/rlottieConfig.cmake
-    ${CMAKE_CURRENT_BINARY_DIR}/rlottieConfigVersion.cmake
-    DESTINATION ${LIB_INSTALL_DIR}/cmake/rlottie
+    ${CMAKE_CURRENT_BINARY_DIR}/lottie-playerConfig.cmake
+    ${CMAKE_CURRENT_BINARY_DIR}/lottie-playerConfigVersion.cmake
+    DESTINATION ${LIB_INSTALL_DIR}/cmake/lottie-player
 )
 
 
-export(EXPORT rlottie-targets FILE ${CMAKE_CURRENT_BINARY_DIR}/rlottieTargets.cmake NAMESPACE rlottie::)
+export(EXPORT lottie-player-targets FILE ${CMAKE_CURRENT_BINARY_DIR}/lottie-playerTargets.cmake NAMESPACE lottie-player::)
 
 #Register package in user's package registry
-export(PACKAGE rlottie)
+export(PACKAGE lottie-player)
 
diff --git a/COPYING b/COPYING
index 293d8da..550e1e9 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -1,6 +1,6 @@
 Licensing
 
-rlottie basically comes with LGPL-v2.1 license(licenses/COPYING.LGPL)
+lottie-player basically comes with LGPL-v2.1 license(licenses/COPYING.LGPL)
 but some parts of shared code are covered by different licenses. Listed
 below are the folder names and the license file covering it. Note that this
 license would cover all of the source invovled in each folders, unless
index dce83ba..e028653 100644 (file)
@@ -21,7 +21,7 @@ RUN TESTS
 
 BUILD WITH CMAKE
 ================
-librlottie can also be built using the cmake build system.
+liblottie-player can also be built using the cmake build system.
 
 1. install cmake.  (Follow instructions at https://cmake.org/download/)
 2. create a new build/ directory
diff --git a/cmake/lottie-playerConfig.cmake.in b/cmake/lottie-playerConfig.cmake.in
new file mode 100644 (file)
index 0000000..8367242
--- /dev/null
@@ -0,0 +1,16 @@
+get_filename_component(lottie-player_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+include(CMakeFindDependencyMacro)
+
+list(APPEND CMAKE_MODULE_PATH ${lottie-player_CMAKE_DIR})
+
+# NOTE Had to use find_package because find_dependency does not support COMPONENTS or MODULE until 3.8.0
+
+#find_dependency(RapidJSON 1.0 REQUIRED MODULE)
+#find_package(Boost 1.55 REQUIRED COMPONENTS regex)
+list(REMOVE_AT CMAKE_MODULE_PATH -1)
+
+if(NOT TARGET lottie-player::lottie-player)
+    include("${lottie-player_CMAKE_DIR}/lottie-playerTargets.cmake")
+endif()
+
+set(lottie-player_LIBRARIES lottie-player::lottie-player)
diff --git a/cmake/rlottieConfig.cmake.in b/cmake/rlottieConfig.cmake.in
deleted file mode 100644 (file)
index 730672a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-get_filename_component(rlottie_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(CMakeFindDependencyMacro)
-
-list(APPEND CMAKE_MODULE_PATH ${rlottie_CMAKE_DIR})
-
-# NOTE Had to use find_package because find_dependency does not support COMPONENTS or MODULE until 3.8.0
-
-#find_dependency(RapidJSON 1.0 REQUIRED MODULE)
-#find_package(Boost 1.55 REQUIRED COMPONENTS regex)
-list(REMOVE_AT CMAKE_MODULE_PATH -1)
-
-if(NOT TARGET rlottie::rlottie)
-    include("${rlottie_CMAKE_DIR}/rlottieTargets.cmake")
-endif()
-
-set(rlottie_LIBRARIES rlottie::rlottie)
index 7671735..a09417a 100644 (file)
@@ -18,7 +18,7 @@
 
 #include"lottieview.h"
 
-using namespace rlottie;
+using namespace lottie;
 
 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);
-            rlottie::Surface surface(buffer, width, height, bytesperline);
+            lottie::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);
-            rlottie::Surface surface(buffer, width, height, bytesperline);
+            lottie::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 1ff8266..aab0336 100644 (file)
@@ -108,7 +108,7 @@ public:
     Evas_Object             *mVg;
     int                      mRepeatCount;
     LottieView::RepeatMode   mRepeatMode;
-    std::unique_ptr<rlottie::Animation>       mPlayer;
+    std::unique_ptr<lottie::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<rlottie::Surface>        mRenderTask;
+    std::future<lottie::Surface>        mRenderTask;
 
     //keep a segment of the animation default is [0, 1]
     float                   mMinProgress{0};
index 0e31a66..adc3dc0 100644 (file)
@@ -1,4 +1,4 @@
-target_include_directories(rlottie
+target_include_directories(lottie-player
     PRIVATE
         "${CMAKE_CURRENT_LIST_DIR}"
     )
\ No newline at end of file
index 7821641..47aa4e2 100644 (file)
@@ -49,7 +49,7 @@ class AnimationImpl;
 struct LOTNode;
 struct LOTLayerNode;
 
-namespace rlottie {
+namespace lottie {
 
 class LOT_EXPORT Surface {
 public:
diff --git a/lottie-player.pc.in b/lottie-player.pc.in
new file mode 100644 (file)
index 0000000..f7ea6f0
--- /dev/null
@@ -0,0 +1,12 @@
+prefix=@PREFIX@
+exec_prefix=@EXEC_DIR@
+apiversion=@player_version@
+libdir=@LIBDIR@
+includedir=@INCDIR@
+
+Name: lottie-player
+Description: A lottie-player library
+Version: @player_version@
+Requires:
+Libs: -L${libdir} -llottie-player
+Cflags: -I${includedir} -std=c++14
diff --git a/packaging/lottie-player.manifest b/packaging/lottie-player.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
similarity index 76%
rename from packaging/rlottie.spec
rename to packaging/lottie-player.spec
index 2e39542..f2bf9e4 100644 (file)
@@ -1,5 +1,5 @@
-Name:       rlottie
-Summary:    lottie rendering library
+Name:       lottie-player
+Summary:    lottie player library
 Version:    0.0.1
 Release:    1
 Group:      UI Framework/Services
@@ -15,13 +15,13 @@ lottie player library
 
 
 %package devel
-Summary:    lottie rendering library (devel)
+Summary:    lottie player library (devel)
 Group:      Development/Libraries
 Requires:   %{name} = %{version}-%{release}
 
 
 %description devel
-lottie rendering library (devel)
+lottie player library (devel)
 
 
 %prep
@@ -54,13 +54,13 @@ make %{?jobs:-j%jobs}
 
 %files
 %defattr(-,root,root,-)
-%{_libdir}/librlottie.so.*
-%manifest packaging/%{name}.manifest
+%{_libdir}/liblottie-player.so.*
+%manifest %{name}.manifest
 %license COPYING licenses/COPYING*
 
 %files devel
 %defattr(-,root,root,-)
 %{_includedir}/*.h
-%{_libdir}/librlottie.so
-%{_libdir}/cmake/rlottie/*.cmake
-%{_libdir}/pkgconfig/rlottie.pc
+%{_libdir}/liblottie-player.so
+%{_libdir}/cmake/lottie-player/*.cmake
+%{_libdir}/pkgconfig/lottie-player.pc
diff --git a/rlottie.pc.in b/rlottie.pc.in
deleted file mode 100644 (file)
index bf279e2..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=@PREFIX@
-exec_prefix=@EXEC_DIR@
-apiversion=@rlottie_version@
-libdir=@LIBDIR@
-includedir=@INCDIR@
-
-Name: rlottie
-Description: A rlottie library
-Version: @rlottie_version@
-Requires:
-Libs: -L${libdir} -lrlottie
-Cflags: -I${includedir} -std=c++14
index 30a049a..7737952 100644 (file)
@@ -1,9 +1,9 @@
-target_sources(rlottie
+target_sources(lottie-player
     PRIVATE
         "${CMAKE_CURRENT_LIST_DIR}/lottieanimation_capi.cpp"
     )
 
-target_include_directories(rlottie
+target_include_directories(lottie-player
     PRIVATE
         "${CMAKE_CURRENT_LIST_DIR}"
     )
index dd7f5e1..6748f20 100644 (file)
@@ -19,7 +19,7 @@
 #include "rlottie.h"
 #include "vdebug.h"
 
-using namespace rlottie;
+using namespace lottie;
 
 extern "C" {
 
@@ -117,7 +117,7 @@ lottie_animation_render_async(Lottie_Animation_S *animation,
 {
     if (!animation) return;
 
-    rlottie::Surface surface(buffer, width, height, bytes_per_line);
+    lottie::Surface surface(buffer, width, height, bytes_per_line);
     animation->mRenderTask = animation->mAnimation->render(frame_number, surface);
     animation->mBufferRef = buffer;
 }
index 7261d43..4fb944a 100644 (file)
@@ -1,5 +1,5 @@
 
-target_sources(rlottie
+target_sources(lottie-player
     PRIVATE
         "${CMAKE_CURRENT_LIST_DIR}/lottieitem.cpp"
         "${CMAKE_CURRENT_LIST_DIR}/lottieloader.cpp"
@@ -8,7 +8,7 @@ target_sources(rlottie
         "${CMAKE_CURRENT_LIST_DIR}/lottieanimation.cpp"
     )
 
-target_include_directories(rlottie
+target_include_directories(lottie-player
     PRIVATE
         "${CMAKE_CURRENT_LIST_DIR}"
     )
index 1084a23..1f041f8 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <fstream>
 
-using namespace rlottie;
+using namespace lottie;
 
 struct RenderTask {
     RenderTask() { receiver = sender.get_future(); }
index 3cd78fd..aa88896 100644 (file)
@@ -121,7 +121,7 @@ const LOTLayerNode * LOTCompItem::renderTree() const
     return mRootLayer->layerNode();
 }
 
-bool LOTCompItem::render(const rlottie::Surface &surface)
+bool LOTCompItem::render(const lottie::Surface &surface)
 {
     VBitmap bitmap(reinterpret_cast<uchar *>(surface.buffer()),
                    surface.width(), surface.height(),
index 9eda6d1..b38a379 100644 (file)
@@ -56,7 +56,7 @@ public:
    VSize size() const;
    void buildRenderTree();
    const LOTLayerNode * renderTree()const;
-   bool render(const rlottie::Surface &surface);
+   bool render(const lottie::Surface &surface);
 private:
    VMatrix                                    mScaleMatrix;
    VSize                                      mViewSize;
index 30f9d29..cbf9c98 100644 (file)
@@ -2,7 +2,7 @@
 add_subdirectory(freetype)
 add_subdirectory(pixman)
 
-target_sources(rlottie
+target_sources(lottie-player
     PRIVATE
         "${CMAKE_CURRENT_LIST_DIR}/vrect.cpp"
         "${CMAKE_CURRENT_LIST_DIR}/vdasher.cpp"
@@ -26,7 +26,7 @@ target_sources(rlottie
         "${CMAKE_CURRENT_LIST_DIR}/vimageloader.cpp"
     )
 
-target_include_directories(rlottie
+target_include_directories(lottie-player
     PRIVATE
         "${CMAKE_CURRENT_LIST_DIR}"
     )
index 31a9f08..0ce7e69 100644 (file)
@@ -1,11 +1,11 @@
-target_sources(rlottie
+target_sources(lottie-player
     PRIVATE
         "${CMAKE_CURRENT_LIST_DIR}/v_ft_math.cpp"
         "${CMAKE_CURRENT_LIST_DIR}/v_ft_raster.cpp"
         "${CMAKE_CURRENT_LIST_DIR}/v_ft_stroker.cpp"
     )
 
-target_include_directories(rlottie
+target_include_directories(lottie-player
     PRIVATE
         "${CMAKE_CURRENT_LIST_DIR}"
     )
\ No newline at end of file
index c08593f..d38a094 100644 (file)
@@ -1,17 +1,17 @@
-target_sources(rlottie
+target_sources(lottie-player
     PRIVATE
         "${CMAKE_CURRENT_LIST_DIR}/vregion.cpp"
     )
 
 IF("${ARCH}" STREQUAL "arm")
 SET(CMAKE_ASM_FLAGS "${CFLAGS} -x assembler-with-cpp")
-target_sources(rlottie
+target_sources(lottie-player
     PRIVATE
         "${CMAKE_CURRENT_LIST_DIR}/pixman-arm-neon-asm.S"
     )
 ENDIF("${ARCH}" STREQUAL "arm")
 
-target_include_directories(rlottie
+target_include_directories(lottie-player
     PRIVATE
         "${CMAKE_CURRENT_LIST_DIR}"
     )
index d704fb4..7b08b4f 100644 (file)
@@ -5,10 +5,10 @@ class AnimationTest : public ::testing::Test {
 public:
     void SetUp()
     {
-        animationInvalid = rlottie::Animation::loadFromFile("wrong_file.json");
+        animationInvalid = lottie::Animation::loadFromFile("wrong_file.json");
         std::string filePath = DEMO_DIR;
         filePath +="mask.json";
-        animation = rlottie::Animation::loadFromFile(filePath);
+        animation = lottie::Animation::loadFromFile(filePath);
 
     }
     void TearDown()
@@ -16,8 +16,8 @@ public:
 
     }
 public:
-    std::unique_ptr<rlottie::Animation> animationInvalid;
-    std::unique_ptr<rlottie::Animation> animation;
+    std::unique_ptr<lottie::Animation> animationInvalid;
+    std::unique_ptr<lottie::Animation> animation;
 };
 
 TEST_F(AnimationTest, loadFromFile_N) {