commit a0100a6229ee32d4ff90e68fa578a4a5c9bfaa65
parent 86e00cd0192f219d76a7ecae424f05f3febd6792
Author: kernelkind <kernelkind@gmail.com>
Date: Sat, 22 Nov 2025 20:23:25 -0700
tmp(refactor): Animation -> AnimationOld
Signed-off-by: kernelkind <kernelkind@gmail.com>
Diffstat:
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/crates/notedeck/src/imgcache.rs b/crates/notedeck/src/imgcache.rs
@@ -206,7 +206,7 @@ impl<'a> From<&'a mut TextureStateInternal> for LoadableTextureState<'a> {
pub enum TexturedImage {
Static(TextureHandle),
- Animated(Animation),
+ Animated(AnimationOld),
}
impl TexturedImage {
@@ -218,13 +218,13 @@ impl TexturedImage {
}
}
-pub struct Animation {
+pub struct AnimationOld {
pub first_frame: TextureFrame,
pub other_frames: Vec<TextureFrame>,
pub receiver: Option<Receiver<TextureFrame>>,
}
-impl Animation {
+impl AnimationOld {
pub fn get_frame(&self, index: usize) -> Option<&TextureFrame> {
if index == 0 {
Some(&self.first_frame)
diff --git a/crates/notedeck/src/lib.rs b/crates/notedeck/src/lib.rs
@@ -54,7 +54,7 @@ pub use filter::{FilterState, FilterStates, UnifiedSubscription};
pub use fonts::NamedFontFamily;
pub use i18n::{CacheStats, FluentArgs, FluentValue, LanguageIdentifier, Localization};
pub use imgcache::{
- get_render_state, Animation, GifState, GifStateMap, ImageFrame, Images, LatestTexture,
+ get_render_state, AnimationOld, GifState, GifStateMap, ImageFrame, Images, LatestTexture,
LoadableTextureState, MediaCache, MediaCacheType, RenderState, TextureFrame, TextureState,
TextureStateOld, TexturedImage, TexturesCache,
};
diff --git a/crates/notedeck/src/media/gif.rs b/crates/notedeck/src/media/gif.rs
@@ -4,7 +4,7 @@ use std::{
};
use crate::media::AnimationMode;
-use crate::Animation;
+use crate::AnimationOld;
use crate::{GifState, GifStateMap, TextureStateOld, TexturedImage, TexturesCache};
use egui::TextureHandle;
use std::time::Duration;
@@ -34,7 +34,7 @@ struct ProcessedGifFrame {
/// Process a gif state frame, and optionally present a new
/// state and when to repaint it
fn process_gif_frame(
- animation: &Animation,
+ animation: &AnimationOld,
frame_state: Option<&GifState>,
animation_mode: AnimationMode,
) -> ProcessedGifFrame {
diff --git a/crates/notedeck/src/media/images.rs b/crates/notedeck/src/media/images.rs
@@ -1,5 +1,5 @@
use crate::media::load_texture_checked;
-use crate::{Animation, ImageFrame, MediaCache, MediaCacheType, TextureFrame, TexturedImage};
+use crate::{AnimationOld, ImageFrame, MediaCache, MediaCacheType, TextureFrame, TexturedImage};
use egui::{pos2, Color32, ColorImage, Context, Rect, Sense, SizeHint};
use image::codecs::gif::GifDecoder;
use image::imageops::FilterType;
@@ -335,7 +335,7 @@ fn generate_gif(
))
},
|first_frame| {
- Ok(TexturedImage::Animated(Animation {
+ Ok(TexturedImage::Animated(AnimationOld {
other_frames: Default::default(),
receiver: Some(tex_output),
first_frame,