lottie: make functions inline. 21/191721/2
authorsubhransu mohanty <sub.mohanty@samsung.com>
Tue, 23 Oct 2018 00:09:49 +0000 (09:09 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Tue, 23 Oct 2018 00:49:19 +0000 (09:49 +0900)
Change-Id: I0e9a085071965c95fb4867e313260f8c0b051e24

src/lottie/lottieanimation.cpp

index a6ba779..86edc96 100644 (file)
@@ -11,16 +11,17 @@ using namespace lottie;
 class AnimationImpl {
 
 public:
-    void                          init(const std::shared_ptr<LOTModel> &model);
-    bool                          update(size_t frameNo, const VSize &size);
-    VSize                         size() const;
-    double                        duration() const;
-    double                        frameRate() const;
-    size_t                        totalFrame() const;
-    size_t                        frameAtPos(double pos) const;
-    const std::vector<LOTNode *> &renderList(size_t frameNo, const VSize &size);
-    Surface                       render(size_t frameNo, const Surface &surface);
-
+    void    init(const std::shared_ptr<LOTModel> &model);
+    bool    update(size_t frameNo, const VSize &size);
+    VSize   size() const {return mCompItem->size();}
+    double  duration() const {return mModel->duration();}
+    double  frameRate() const {return mModel->frameRate();}
+    size_t  totalFrame() const {return mModel->frameDuration();}
+    size_t  frameAtPos(double pos) const {return mModel->frameAtPos(pos);}
+    Surface render(size_t frameNo, const Surface &surface);
+
+    const std::vector<LOTNode *> &
+                 renderList(size_t frameNo, const VSize &size);
 private:
     std::string                  mFilePath;
     std::shared_ptr<LOTModel>    mModel;
@@ -28,26 +29,6 @@ private:
     std::atomic<bool>            mRenderInProgress;
 };
 
-double AnimationImpl::frameRate() const
-{
-   return mModel->frameRate();
-}
-
-size_t AnimationImpl::totalFrame() const
-{
-   return mModel->frameDuration();
-}
-
-size_t AnimationImpl::frameAtPos(double pos) const
-{
-    return mModel->frameAtPos(pos);
-}
-
-VSize AnimationImpl::size() const
-{
-    return mCompItem->size();
-}
-
 const std::vector<LOTNode *> &AnimationImpl::renderList(size_t frameNo, const VSize &size)
 {
     if (update(frameNo, size)) {
@@ -56,11 +37,6 @@ const std::vector<LOTNode *> &AnimationImpl::renderList(size_t frameNo, const VS
     return mCompItem->renderList();
 }
 
-double AnimationImpl::duration() const
-{
-    return mModel->duration();
-}
-
 bool AnimationImpl::update(size_t frameNo, const VSize &size)
 {
    if (frameNo > mModel->frameDuration())