From ac54356b3cf03eadc1b1ebb86b0c7263a50eb45a Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Mon, 3 Dec 2018 09:52:31 +0900 Subject: [PATCH] lottie/vector: optimize RleTask structure packing. Change-Id: I5c0be929f51b35720d5c53bdeabec75227274761 --- src/vector/vraster.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/vector/vraster.cpp b/src/vector/vraster.cpp index 1c72f78..8f638b6 100644 --- a/src/vector/vraster.cpp +++ b/src/vector/vraster.cpp @@ -238,18 +238,16 @@ static void rleGenerationCb(int count, const SW_FT_Span *spans, void *user) } struct RleTask { - RleTask() { receiver = sender.get_future(); } std::promise sender; - std::future receiver; - bool stroke; VPath path; VRle rle; - FillRule fillRule; - CapStyle cap; - JoinStyle join; float width; float meterLimit; VRect clip; + FillRule fillRule; + CapStyle cap; + JoinStyle join; + bool stroke; VRle operator()(FTOutline &outRef, SW_FT_Stroker &stroker); void render(FTOutline &outRef); }; @@ -363,7 +361,7 @@ public: std::future async(RleTask *task) { - auto receiver = std::move(task->receiver); + auto receiver = std::move(task->sender.get_future()); auto i = _index++; for (unsigned n = 0; n != _count; ++n) { -- 2.34.1