From: subhransu mohanty Date: Thu, 29 Nov 2018 06:38:40 +0000 (+0900) Subject: lottie/vector: take the fast path in addPath() api only when path is null. X-Git-Tag: submit/tizen/20181211.054046~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8706eca90527cf2a7f4e05b3a6d645d194b7fc5c;p=platform%2Fcore%2Fuifw%2Flottie-player.git lottie/vector: take the fast path in addPath() api only when path is null. This patch is to avoid unnecessary allocation and deallocation when the path is empty but not null during addPath Change-Id: Iab3820419257fbbecaddc93d73e5868b1889e6c5 --- diff --git a/src/vector/vpath.h b/src/vector/vpath.h index 8cec2d7..f336103 100644 --- a/src/vector/vpath.h +++ b/src/vector/vpath.h @@ -228,7 +228,7 @@ inline void VPath::addPath(const VPath &path) { if (path.empty()) return; - if (empty()) { + if (null()) { *this = path; } else { d.write().addPath(path.d.read());