From: subhransu mohanty Date: Tue, 23 Oct 2018 00:09:49 +0000 (+0900) Subject: lottie: make functions inline. X-Git-Tag: submit/tizen/20181129.071502~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=416adb599e5a9fef10b0e07ccb75a060c804a5aa;p=platform%2Fcore%2Fuifw%2Flottie-player.git lottie: make functions inline. Change-Id: I0e9a085071965c95fb4867e313260f8c0b051e24 --- diff --git a/src/lottie/lottieanimation.cpp b/src/lottie/lottieanimation.cpp index a6ba779..86edc96 100644 --- a/src/lottie/lottieanimation.cpp +++ b/src/lottie/lottieanimation.cpp @@ -11,16 +11,17 @@ using namespace lottie; class AnimationImpl { public: - void init(const std::shared_ptr &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 &renderList(size_t frameNo, const VSize &size); - Surface render(size_t frameNo, const Surface &surface); - + void init(const std::shared_ptr &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 & + renderList(size_t frameNo, const VSize &size); private: std::string mFilePath; std::shared_ptr mModel; @@ -28,26 +29,6 @@ private: std::atomic 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 &AnimationImpl::renderList(size_t frameNo, const VSize &size) { if (update(frameNo, size)) { @@ -56,11 +37,6 @@ const std::vector &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())