image: Keep texture around until new is available

Keep previous texture around during image reloads to avoid flickering.
This commit is contained in:
Sophie Herold 2024-08-16 13:29:27 +02:00
parent 0f69aa39c5
commit be32072d7a
6 changed files with 38 additions and 20 deletions

View file

@ -163,6 +163,7 @@ mod imp {
/// Track changes to this image
pub(super) file_monitor: RefCell<Option<gio::FileMonitor>>,
pub(super) frame_buffer: Arc<SharedFrameBuffer>,
pub(super) previous_frame_buffer: SharedFrameBuffer,
pub(super) decoder: RefCell<Option<Arc<Decoder>>>,
/// Rotation final value (can differ from `rotation` during animation)