From: Hermet Park Date: Thu, 13 Dec 2018 08:47:10 +0000 (+0900) Subject: remove redundant apis. X-Git-Tag: submit/tizen/20181217.041818~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73f52824285ca5b3fa06a9e88b13ef6fbe7ad141;p=platform%2Fcore%2Fuifw%2Flottie-player.git remove redundant apis. Change-Id: Iacc975f28d6a87e9994be49d291ea67037263a82 --- diff --git a/inc/lottieanimation.h b/inc/lottieanimation.h index 3a9c1f2..e115ebf 100644 --- a/inc/lottieanimation.h +++ b/inc/lottieanimation.h @@ -221,20 +221,6 @@ public: */ void renderSync(size_t frameNo, Surface surface); - /** - * @brief Returns list of rendering nodes that that represents the - * content of the lottie resource at frame number {frameNo}. - * - * @param[in] frameNo Content corresponds to the frameno needs to be extracted. - * @param[in] width content viewbox width - * @param[in] height content viewbox height - * - * @return render node list. - * - * @internal - */ - const std::vector &renderList(size_t frameNo, size_t width, size_t height) const; - /** * @brief Returns root layer of the composition updated with * content of the lottie resource at frame number {frameNo}. diff --git a/inc/lottieanimation_capi.h b/inc/lottieanimation_capi.h index 89b94cd..d1c27eb 100644 --- a/inc/lottieanimation_capi.h +++ b/inc/lottieanimation_capi.h @@ -20,23 +20,6 @@ LOT_EXPORT double lottie_animation_get_duration(const Lottie_Animation *animatio LOT_EXPORT size_t lottie_animation_get_totalframe(const Lottie_Animation *animation); LOT_EXPORT double lottie_animation_get_framerate(const Lottie_Animation *animation); - -/* - * Request to update the content of the frame $frame_number in to Animation object. - * frame_number, the content of the animation in that frame number - * width , width of the viewbox - * height , height of the viewbox - * - * PS : user must call lottie_animation_get_node_count and lottie_animation_get_node - * to get the renderlist. - */ -LOT_EXPORT size_t lottie_animation_prepare_frame(Lottie_Animation *animation, - size_t frameNo, - size_t w, size_t h); -LOT_EXPORT size_t lottie_animation_get_node_count(const Lottie_Animation *animation); -LOT_EXPORT const LOTNode* lottie_animation_get_node(Lottie_Animation *animation, size_t idx); - - /* * Get the render tree which contains the snapshot of the animation object at frame $frame_number * frame_number, the content of the animation in that frame number diff --git a/src/binding/c/lottieanimation_capi.cpp b/src/binding/c/lottieanimation_capi.cpp index 2d7efc3..6c287b8 100644 --- a/src/binding/c/lottieanimation_capi.cpp +++ b/src/binding/c/lottieanimation_capi.cpp @@ -73,32 +73,6 @@ LOT_EXPORT double lottie_animation_get_framerate(const Lottie_Animation_S *anima return animation->mAnimation->frameRate(); } -LOT_EXPORT void lottie_animation_prepare_frame(Lottie_Animation_S *animation, size_t frameNo, size_t w, size_t h) -{ - if (!animation) return; - - animation->mFrameNo = frameNo; - animation->mWidth = w; - animation->mHeight = h; - animation->mArraySize = animation->mAnimation->renderList(frameNo, w, h).size(); -} - -LOT_EXPORT size_t lottie_animation_get_node_count(const Lottie_Animation_S *animation) -{ - if (!animation) return 0; - - return animation->mArraySize; -} - -LOT_EXPORT const LOTNode* lottie_animation_get_node(const Lottie_Animation_S *animation, size_t idx) -{ - if (!animation) return nullptr; - - if (idx >= animation->mArraySize) return nullptr; - - return animation->mAnimation->renderList(animation->mFrameNo, animation->mWidth, animation->mHeight)[idx]; -} - LOT_EXPORT const LOTLayerNode * lottie_animation_render_tree(Lottie_Animation_S *animation, size_t frameNo, size_t w, size_t h) { if (!animation) return nullptr; diff --git a/src/lottie/lottieanimation.cpp b/src/lottie/lottieanimation.cpp index 831bb8e..5ba030b 100644 --- a/src/lottie/lottieanimation.cpp +++ b/src/lottie/lottieanimation.cpp @@ -20,8 +20,6 @@ public: 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); const LOTLayerNode * renderTree(size_t frameNo, const VSize &size); private: @@ -31,14 +29,6 @@ private: std::atomic mRenderInProgress; }; -const std::vector &AnimationImpl::renderList(size_t frameNo, const VSize &size) -{ - if (update(frameNo, size)) { - mCompItem->buildRenderList(); - } - return mCompItem->renderList(); -} - const LOTLayerNode *AnimationImpl::renderTree(size_t frameNo, const VSize &size) { if (update(frameNo, size)) { @@ -238,12 +228,6 @@ size_t Animation::frameAtPos(double pos) return d->frameAtPos(pos); } -const std::vector & -Animation::renderList(size_t frameNo, size_t width, size_t height) const -{ - return d->renderList(frameNo, VSize(width, height)); -} - const LOTLayerNode * Animation::renderTree(size_t frameNo, size_t width, size_t height) const { diff --git a/src/lottie/lottieitem.cpp b/src/lottie/lottieitem.cpp index 0ea95e1..411c454 100644 --- a/src/lottie/lottieitem.cpp +++ b/src/lottie/lottieitem.cpp @@ -88,24 +88,6 @@ bool LOTCompItem::update(int frameNo) return true; } -void LOTCompItem::buildRenderList() -{ - mDrawableList.clear(); - mRootLayer->renderList(mDrawableList); - - mRenderList.clear(); - for (auto &i : mDrawableList) { - LOTDrawable *lotDrawable = static_cast(i); - lotDrawable->sync(); - mRenderList.push_back(lotDrawable->mCNode.get()); - } -} - -const std::vector &LOTCompItem::renderList() const -{ - return mRenderList; -} - void LOTCompItem::buildRenderTree() { mRootLayer->buildLayerNode(); diff --git a/src/lottie/lottieitem.h b/src/lottie/lottieitem.h index 891e94c..7a1a5a2 100644 --- a/src/lottie/lottieitem.h +++ b/src/lottie/lottieitem.h @@ -36,8 +36,6 @@ public: bool update(int frameNo); void resize(const VSize &size); VSize size() const; - const std::vector& renderList()const; - void buildRenderList(); void buildRenderTree(); const LOTLayerNode * renderTree()const; bool render(const lottie::Surface &surface);