mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 05:51:42 +00:00
lottie/vector: optimize RleTask structure packing.
Change-Id: I5c0be929f51b35720d5c53bdeabec75227274761
This commit is contained in:
parent
21967e1fdb
commit
ac54356b3c
@ -238,18 +238,16 @@ static void rleGenerationCb(int count, const SW_FT_Span *spans, void *user)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct RleTask {
|
struct RleTask {
|
||||||
RleTask() { receiver = sender.get_future(); }
|
|
||||||
std::promise<VRle> sender;
|
std::promise<VRle> sender;
|
||||||
std::future<VRle> receiver;
|
|
||||||
bool stroke;
|
|
||||||
VPath path;
|
VPath path;
|
||||||
VRle rle;
|
VRle rle;
|
||||||
FillRule fillRule;
|
|
||||||
CapStyle cap;
|
|
||||||
JoinStyle join;
|
|
||||||
float width;
|
float width;
|
||||||
float meterLimit;
|
float meterLimit;
|
||||||
VRect clip;
|
VRect clip;
|
||||||
|
FillRule fillRule;
|
||||||
|
CapStyle cap;
|
||||||
|
JoinStyle join;
|
||||||
|
bool stroke;
|
||||||
VRle operator()(FTOutline &outRef, SW_FT_Stroker &stroker);
|
VRle operator()(FTOutline &outRef, SW_FT_Stroker &stroker);
|
||||||
void render(FTOutline &outRef);
|
void render(FTOutline &outRef);
|
||||||
};
|
};
|
||||||
@ -363,7 +361,7 @@ public:
|
|||||||
|
|
||||||
std::future<VRle> async(RleTask *task)
|
std::future<VRle> async(RleTask *task)
|
||||||
{
|
{
|
||||||
auto receiver = std::move(task->receiver);
|
auto receiver = std::move(task->sender.get_future());
|
||||||
auto i = _index++;
|
auto i = _index++;
|
||||||
|
|
||||||
for (unsigned n = 0; n != _count; ++n) {
|
for (unsigned n = 0; n != _count; ++n) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user