lottie/vector: optimize RleTask structure packing. 97/194297/1
authorsubhransu mohanty <sub.mohanty@samsung.com>
Mon, 3 Dec 2018 00:52:31 +0000 (09:52 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Mon, 3 Dec 2018 00:53:59 +0000 (09:53 +0900)
Change-Id: I5c0be929f51b35720d5c53bdeabec75227274761

src/vector/vraster.cpp

index 1c72f78284a8f7d0a4efbe3216e1e7aeaf9bb13b..8f638b686d45dd534418d998248e9ba89bfcf8d0 100644 (file)
@@ -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<VRle> sender;
-    std::future<VRle>  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<VRle> 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) {