From 7f7cde6b3003027a733fee5ca1f92e3ca44d1264 Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Thu, 9 Aug 2018 11:09:36 +0900 Subject: [PATCH] lottie/render: Draw layers form back to front in the composition layer. Change-Id: I41c0aedef7cc76e768c6d4776f7a29b3b1cab474 --- src/lottie/lottieitem.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lottie/lottieitem.cpp b/src/lottie/lottieitem.cpp index 9785b4a..1dd37e8 100644 --- a/src/lottie/lottieitem.cpp +++ b/src/lottie/lottieitem.cpp @@ -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); } } -- 2.7.4