projects
/
platform
/
core
/
uifw
/
lottie-player.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
548051c
)
lottie/vector: updated paths reserve api policy.
73/185373/1
author
subhransu mohanty
<sub.mohanty@samsung.com>
Mon, 30 Jul 2018 05:31:19 +0000
(14:31 +0900)
committer
subhransu mohanty
<sub.mohanty@samsung.com>
Mon, 30 Jul 2018 05:31:19 +0000
(14:31 +0900)
Change-Id: I9b6e97526d887ec6d342384cb7f2046584dbaf04
src/vector/vpath.cpp
patch
|
blob
|
history
diff --git
a/src/vector/vpath.cpp
b/src/vector/vpath.cpp
index
043bdcf
..
ef5e8c2
100644
(file)
--- a/
src/vector/vpath.cpp
+++ b/
src/vector/vpath.cpp
@@
-121,8
+121,10
@@
int VPath::VPathData::segments() const
void VPath::VPathData::reserve(int pts, int elms)
{
- m_points.reserve(m_points.size() + pts);
- m_elements.reserve(m_elements.size() + elms);
+ if (m_points.capacity() < m_points.size() + pts)
+ m_points.reserve(m_points.size() + pts);
+ if (m_elements.capacity() < m_elements.size() + elms)
+ m_elements.reserve(m_elements.size() + elms);
}
static VPointF curvesForArc(const VRectF &, float, float, VPointF *, int *);