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.
This commit is contained in:
JunsuChoi 2021-02-04 14:47:01 +09:00 committed by Hermet Park
parent 795121fa67
commit 6db7f85ffb

View file

@ -65,7 +65,7 @@ struct Scene::Impl
Compositor* cmp = nullptr; Compositor* cmp = nullptr;
//Half translucent. This condition requires intermediate composition. //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; uint32_t x, y, w, h;
if (!bounds(renderer, &x, &y, &w, &h)) return false; if (!bounds(renderer, &x, &y, &w, &h)) return false;
cmp = renderer.target(x, y, w, h); cmp = renderer.target(x, y, w, h);