mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
add shouldRasterize true for animations
commit_hash:f38e387e47d0e8a26113dad0dbdb9a6274cc514c
This commit is contained in:
+4
@@ -170,6 +170,7 @@ final class DetachableAnimationBlockView: BlockView, DelayedVisibilityActionView
|
||||
childView.frame = convertFrame(to: container)
|
||||
self.childView = nil
|
||||
container.addSubview(childView)
|
||||
childView.layer.shouldRasterize = true
|
||||
childView.setInitialParamsAndAnimate(
|
||||
animations: animationOut?.map { animation in
|
||||
if animation.kind == .fade {
|
||||
@@ -178,6 +179,7 @@ final class DetachableAnimationBlockView: BlockView, DelayedVisibilityActionView
|
||||
return animation
|
||||
},
|
||||
completion: {
|
||||
childView.layer.shouldRasterize = false
|
||||
childView.removeFromSuperview()
|
||||
}
|
||||
)
|
||||
@@ -194,9 +196,11 @@ final class DetachableAnimationBlockView: BlockView, DelayedVisibilityActionView
|
||||
|
||||
let item = DispatchWorkItem { [weak self] in
|
||||
childView.isHidden = false
|
||||
childView.layer.shouldRasterize = true
|
||||
childView.setInitialParamsAndAnimate(
|
||||
animations: animationIn.withDelay(-minDelay),
|
||||
completion: { [weak self] in
|
||||
childView.layer.shouldRasterize = false
|
||||
self?.queuedAnimation = nil
|
||||
self?.animationIn = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user