From: Jaeun Choi Date: Fri, 20 Jul 2018 08:59:34 +0000 (+0900) Subject: lottie: fixed miscellaneous things regarding trim operation X-Git-Tag: submit/tizen/20180917.042405~205 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=547434e2a6d5e0ce3fc2041518bf86d0c233d112;p=platform%2Fcore%2Fuifw%2Flottie-player.git lottie: fixed miscellaneous things regarding trim operation - check if path operator is there before applying it - fixed comment - fixed indentation Change-Id: I2b491423cea3a40e5c28436686b24f92d1e6bcfd --- diff --git a/src/lottie/lottieitem.cpp b/src/lottie/lottieitem.cpp index 06797d1..d928b74 100644 --- a/src/lottie/lottieitem.cpp +++ b/src/lottie/lottieitem.cpp @@ -607,7 +607,8 @@ LOTShapeLayerItem::LOTShapeLayerItem(LOTLayerData *layerData):LOTLayerItem(layer mRoot = new LOTContentGroupItem(nullptr); mRoot->addChildren(layerData); mRoot->processPaintOperation(); - mRoot->processTrimOperation(); + if (layerData->hasPathOperator()) + mRoot->processTrimOperation(); } LOTShapeLayerItem::~LOTShapeLayerItem() @@ -781,7 +782,7 @@ void LOTContentGroupItem::trimOperationHelper(std::vector &list) for (auto i = mContents.rbegin(); i != mContents.rend(); ++i) { auto child = *i; if (auto pathNode = dynamic_cast(child)) { - // the node is a path data node add the paint operation list to it. + // the node is a path data node add the trim operation list to it. pathNode->addTrimOperation(list); } else if (auto trimNode = dynamic_cast(child)) { // add it to the trim operation list @@ -797,7 +798,7 @@ void LOTContentGroupItem::trimOperationHelper(std::vector &list) void LOTPathDataItem::addTrimOperation(std::vector &list) { for(auto trimItem : list) { - mTrimNodeRefs.push_back(trimItem); + mTrimNodeRefs.push_back(trimItem); } }