mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
lottie/vector: update reserve() api in vpath
Change-Id: Ib43afa96a0c1a7764dd410ea1e7f01019f592d6d
This commit is contained in:
parent
f35ca73d48
commit
f6658ae623
@ -83,10 +83,10 @@ int VPath::VPathData::segments() const
|
||||
return m_segments + 1;
|
||||
}
|
||||
|
||||
void VPath::VPathData::reserve(int num_elm)
|
||||
void VPath::VPathData::reserve(int pts, int elms)
|
||||
{
|
||||
m_elements.reserve(num_elm);
|
||||
m_points.reserve(2 * num_elm);
|
||||
m_points.reserve(m_points.size() + pts);
|
||||
m_elements.reserve(m_elements.size() + elms);
|
||||
}
|
||||
|
||||
static VPointF curvesForArc(const VRectF &, float, float, VPointF *, int *);
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
void arcTo(const VRectF &rect, float startAngle, float sweepLength, bool forceMoveTo);
|
||||
void close();
|
||||
void reset();
|
||||
void reserve(int num_elm);
|
||||
void reserve(int pts, int elms);
|
||||
int segments() const;
|
||||
void addCircle(float cx, float cy, float radius, VPath::Direction dir = Direction::CW);
|
||||
void addOval(const VRectF &rect, VPath::Direction dir = Direction::CW);
|
||||
@ -57,7 +57,7 @@ private:
|
||||
void cubicTo(const VPointF &c1, const VPointF &c2, const VPointF &e);
|
||||
void close();
|
||||
void reset();
|
||||
void reserve(int num_elm);
|
||||
void reserve(int, int);
|
||||
void checkNewSegment();
|
||||
int segments() const;
|
||||
void transform(const VMatrix &m);
|
||||
@ -108,9 +108,9 @@ inline void VPath::reset()
|
||||
d.write().reset();
|
||||
}
|
||||
|
||||
inline void VPath::reserve(int num_elm)
|
||||
inline void VPath::reserve(int pts, int elms)
|
||||
{
|
||||
d.write().reserve(num_elm);
|
||||
d.write().reserve(pts, elms);
|
||||
}
|
||||
|
||||
inline int VPath::segments() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user