Unify Animation- and RenderSnapshot

This commit is contained in:
Ivan Molodetskikh
2024-04-13 14:16:07 +04:00
parent 71be19b234
commit 9d5f1c7ef7
10 changed files with 188 additions and 187 deletions
+8 -10
View File
@@ -2,11 +2,9 @@ use std::cell::RefCell;
use std::cmp::{max, min};
use std::rc::Rc;
use niri::layout::{
AnimationSnapshot, LayoutElement, LayoutElementRenderElement, LayoutElementRenderSnapshot,
};
use niri::layout::{LayoutElement, LayoutElementRenderElement, LayoutElementRenderSnapshot};
use niri::render_helpers::renderer::NiriRenderer;
use niri::render_helpers::{RenderSnapshot, RenderTarget};
use niri::render_helpers::RenderTarget;
use niri::window::ResolvedWindowRules;
use smithay::backend::renderer::element::solid::{SolidColorBuffer, SolidColorRenderElement};
use smithay::backend::renderer::element::{Id, Kind};
@@ -175,10 +173,6 @@ impl LayoutElement for TestWindow {
]
}
fn take_last_render(&self) -> LayoutElementRenderSnapshot {
RenderSnapshot::default()
}
fn request_size(&mut self, size: Size<i32, Logical>, _animate: bool) {
self.inner.borrow_mut().requested_size = Some(size);
self.inner.borrow_mut().pending_fullscreen = false;
@@ -233,11 +227,15 @@ impl LayoutElement for TestWindow {
&EMPTY
}
fn animation_snapshot(&self) -> Option<&AnimationSnapshot> {
fn take_unmap_snapshot(&self) -> Option<LayoutElementRenderSnapshot> {
None
}
fn take_animation_snapshot(&mut self) -> Option<AnimationSnapshot> {
fn animation_snapshot(&self) -> Option<&LayoutElementRenderSnapshot> {
None
}
fn take_animation_snapshot(&mut self) -> Option<LayoutElementRenderSnapshot> {
None
}
}