Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ab01b20 authored by Chris Li's avatar Chris Li Committed by Gerrit Code Review
Browse files

Merge "Fix the shadow problem caused by layer parent switching"

parents 7fd163e6 f4200e67
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1608,8 +1608,10 @@ ssize_t Layer::removeChild(const sp<Layer>& layer) {
void Layer::setChildrenDrawingParent(const sp<Layer>& newParent) {
    for (const sp<Layer>& child : mDrawingChildren) {
        child->mDrawingParent = newParent;
        const float parentShadowRadius =
                newParent->canDrawShadows() ? 0.f : newParent->mEffectiveShadowRadius;
        child->computeBounds(newParent->mBounds, newParent->mEffectiveTransform,
                             newParent->mEffectiveShadowRadius);
                             parentShadowRadius);
    }
}