lottie/render: Draw layers form back to front in the composition layer. 15/186315/2
authorsubhransu mohanty <sub.mohanty@samsung.com>
Thu, 9 Aug 2018 02:09:36 +0000 (11:09 +0900)
committerSubhransu Mohanty <sub.mohanty@samsung.com>
Thu, 9 Aug 2018 02:33:10 +0000 (02:33 +0000)
Change-Id: I41c0aedef7cc76e768c6d4776f7a29b3b1cab474

src/lottie/lottieitem.cpp

index 9785b4a..1dd37e8 100644 (file)
@@ -380,8 +380,9 @@ void LOTCompLayerItem::render(VPainter *painter, const VRle &inheritMask)
             mask = mask & inheritMask;
     }
 
-    for (auto &i : mLayers) {
-        i->render(painter, mask);
+    for (auto i = mLayers.rbegin(); i != mLayers.rend(); ++i) {
+        LOTLayerItem *layer = *i;
+        layer->render(painter, mask);
     }
 }