From: Youngbok Shin Date: Thu, 2 Aug 2018 07:59:59 +0000 (+0900) Subject: lottie/raster: remove Const qualifier from VPath parameters X-Git-Tag: submit/tizen/20180917.042405~142 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F75%2F185775%2F1;p=platform%2Fcore%2Fuifw%2Flottie-player.git lottie/raster: remove Const qualifier from VPath parameters The given VPath should be moved by std::move. The std:move only work as our purpose when it is non-const variable. And it also fix a crash issue when its path is not changed, but its other properties are changed. Change-Id: I4135066f99c0eed07e033c368dc4b60e6703ca37 --- diff --git a/src/lottie/lottieitem.cpp b/src/lottie/lottieitem.cpp index 392c112..1696957 100644 --- a/src/lottie/lottieitem.cpp +++ b/src/lottie/lottieitem.cpp @@ -702,10 +702,11 @@ void LOTPathDataItem::update(int frameNo, const VMatrix &parentMatrix, i.drawable->mFlag = VDrawable::DirtyState::None; i.paintNodeRef->updateRenderNode(i.pathNodeRef, i.drawable, i.sameGroup); - if (mPathChanged) { - i.drawable->mPath = mFinalPath; + if (mPathChanged) i.drawable->mFlag |= VDrawable::DirtyState::Path; - } + + if (i.drawable->mFlag & VDrawable::DirtyState::Path) + i.drawable->mPath = mFinalPath; } } diff --git a/src/vector/vraster.cpp b/src/vector/vraster.cpp index b327d55..ec71120 100644 --- a/src/vector/vraster.cpp +++ b/src/vector/vraster.cpp @@ -356,7 +356,7 @@ public: return receiver; } - std::future strokeRle(const VPath &&path, VRle &&rle, CapStyle cap, JoinStyle join, + std::future strokeRle(VPath &&path, VRle &&rle, CapStyle cap, JoinStyle join, float width, float meterLimit) { RleTask *task = new RleTask(); @@ -370,7 +370,7 @@ public: return async(task); } - std::future fillRle(const VPath &&path, VRle &&rle, FillRule fillRule) + std::future fillRle(VPath &&path, VRle &&rle, FillRule fillRule) { RleTask *task = new RleTask(); task->path = std::move(path); @@ -387,7 +387,7 @@ VRaster::VRaster() {} VRaster::~VRaster() {} -std::future VRaster::generateFillInfo(const VPath &&path, VRle &&rle, +std::future VRaster::generateFillInfo(VPath &&path, VRle &&rle, FillRule fillRule) { if (path.isEmpty()) { @@ -398,7 +398,7 @@ std::future VRaster::generateFillInfo(const VPath &&path, VRle &&rle, return raster_scheduler.fillRle(std::move(path), std::move(rle), fillRule); } -std::future VRaster::generateStrokeInfo(const VPath &&path, VRle &&rle, CapStyle cap, +std::future VRaster::generateStrokeInfo(VPath &&path, VRle &&rle, CapStyle cap, JoinStyle join, float width, float meterLimit) { diff --git a/src/vector/vraster.h b/src/vector/vraster.h index c41a4ae..5b5b1aa 100644 --- a/src/vector/vraster.h +++ b/src/vector/vraster.h @@ -22,9 +22,9 @@ public: VRaster &operator=(VRaster const &) = delete; VRaster &operator=(VRaster &&) = delete; - std::future generateFillInfo(const VPath &&path, VRle &&rle, + std::future generateFillInfo(VPath &&path, VRle &&rle, FillRule fillRule = FillRule::Winding); - std::future generateStrokeInfo(const VPath &&path, VRle &&rle, CapStyle cap, + std::future generateStrokeInfo(VPath &&path, VRle &&rle, CapStyle cap, JoinStyle join, float width, float meterLimit);