From: subhransu mohanty Date: Fri, 29 Nov 2019 08:10:19 +0000 (+0900) Subject: rlottie: reenabled optimization when paint item has no content X-Git-Tag: submit/tizen/20191201.211113^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1fb128a4c5405532a7fa9b68451c7fc9f52e84c;p=platform%2Fcore%2Fuifw%2Flottie-player.git rlottie: reenabled optimization when paint item has no content --- diff --git a/src/lottie/lottieitem.cpp b/src/lottie/lottieitem.cpp index 292d26c..ee0743e 100644 --- a/src/lottie/lottieitem.cpp +++ b/src/lottie/lottieitem.cpp @@ -1175,16 +1175,20 @@ void LOTPaintDataItem::updateRenderNode() void LOTPaintDataItem::renderList(std::vector &list) { - //@TODO This optimization breaks when the layer - // is used as Matte. Find out the reason for this - // regression then reenable it. - //if (!mContentToRender) return; - if (mRenderNodeUpdate) { updateRenderNode(); mRenderNodeUpdate = false; } - list.push_back(&mDrawable); + + // Q: Why we even update the final path if we don't have content + // to render ? + // Ans: We update the render nodes because we will loose the + // dirty path information at end of this frame. + // so if we return early without updating the final path. + // in the subsequent frame when we have content to render but + // we may not able to update our final path properly as we + // don't know what paths got changed in between. + if (mContentToRender) list.push_back(&mDrawable); } void LOTPaintDataItem::addPathItems(std::vector &list,