From 6db7f85ffb113086a0bfbfadade2074a78ff7157 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Thu, 4 Feb 2021 14:47:01 +0900 Subject: [PATCH] common Scene: Fix translucent composition condition If a scene has another scene as a child and the number of children is 1, the composition of the child does not work. Therefore, fix that composition works as long as the number of children is not 0. --- src/lib/tvgSceneImpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/tvgSceneImpl.h b/src/lib/tvgSceneImpl.h index 4745da75..f8e7b9d5 100644 --- a/src/lib/tvgSceneImpl.h +++ b/src/lib/tvgSceneImpl.h @@ -65,7 +65,7 @@ struct Scene::Impl Compositor* cmp = nullptr; //Half translucent. This condition requires intermediate composition. - if ((opacity < 255 && opacity > 0) && (paints.count > 1)) { + if ((opacity < 255 && opacity > 0) && (paints.count > 0)) { uint32_t x, y, w, h; if (!bounds(renderer, &x, &y, &w, &h)) return false; cmp = renderer.target(x, y, w, h);