Skip to content

Commit

Permalink
Add output_frameno
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-zero committed Mar 15, 2021
1 parent ecce9c1 commit 89d4e88
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/api/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,17 @@ impl InterConfig {
// that gets cached and reused throughout the life of a frame.
#[derive(Clone)]
pub(crate) struct FrameData<T: Pixel> {
pub(crate) output_frameno: u64,
pub(crate) fi: FrameInvariants<T>,
pub(crate) fs: FrameState<T>,
}

impl<T: Pixel> FrameData<T> {
pub(crate) fn new(fi: FrameInvariants<T>, frame: Arc<Frame<T>>) -> Self {
pub(crate) fn new(
output_frameno: u64, fi: FrameInvariants<T>, frame: Arc<Frame<T>>,
) -> Self {
let fs = FrameState::new_with_frame(&fi, frame);
FrameData { fi, fs }
FrameData { output_frameno, fi, fs }
}
}

Expand Down Expand Up @@ -444,7 +447,10 @@ impl<T: Pixel> ContextInner<T> {

let frame =
self.frame_q.get(&fi.input_frameno).as_ref().unwrap().as_ref().unwrap();
self.frame_data.insert(output_frameno, FrameData::new(fi, frame.clone()));
self.frame_data.insert(
output_frameno,
FrameData::new(output_frameno, fi, frame.clone()),
);

Ok(())
}
Expand Down

0 comments on commit 89d4e88

Please sign in to comment.