1
0
Fork 0
forked from wry/wry

Retain surface textures for animations

This commit is contained in:
atagen 2026-05-21 15:45:32 +10:00
parent 3540cdc4be
commit fba9d65ba1
8 changed files with 365 additions and 19 deletions

View file

@ -2,7 +2,9 @@ use {
crate::{
acceptor::Acceptor,
allocator::BufferObject,
animation::{AnimationCurve, AnimationState, AnimationTick, expand_damage_rect},
animation::{
AnimationCurve, AnimationState, AnimationTick, RetainedToplevel, expand_damage_rect,
},
async_engine::{AsyncEngine, SpawnedFuture},
backend::{
Backend, BackendConnectorState, BackendConnectorStateSerials, BackendDrmDevice,
@ -1469,7 +1471,13 @@ impl State {
self.eng.now().msec()
}
pub fn queue_tiled_animation(self: &Rc<Self>, node_id: NodeId, old: Rect, new: Rect) {
pub fn queue_tiled_animation(
self: &Rc<Self>,
node_id: NodeId,
old: Rect,
new: Rect,
retained: Option<Rc<RetainedToplevel>>,
) {
if !self.animations.enabled.get()
|| !self.layout_animations_active.get()
|| self.suppress_animations_for_next_layout.get()
@ -1494,6 +1502,7 @@ impl State {
node_id,
old,
new,
retained,
now,
self.animations.duration_ms.get(),
self.animations.curve.get(),