common Scene: Fix translucent composition condition
authorJunsuChoi <jsuya.choi@samsung.com>
Thu, 4 Feb 2021 05:47:01 +0000 (14:47 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Tue, 23 Feb 2021 00:32:35 +0000 (09:32 +0900)
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

index 4745da7..f8e7b9d 100644 (file)
@@ -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);