cargo: Update to glycin 4.0.0-alpha
This commit is contained in:
parent
95e473207f
commit
05edeb1418
7 changed files with 540 additions and 174 deletions
|
|
@ -43,7 +43,11 @@ impl Drop for Glycin {
|
|||
}
|
||||
|
||||
impl Glycin {
|
||||
pub fn new(image: glycin::Image, updater: UpdateSender, tiles: Arc<SharedFrameBuffer>) -> Self {
|
||||
pub fn new(
|
||||
mut image: glycin::Image,
|
||||
updater: UpdateSender,
|
||||
tiles: Arc<SharedFrameBuffer>,
|
||||
) -> Self {
|
||||
let cancellable = image.cancellable();
|
||||
|
||||
let (next_frame_send, next_frame_recv) = async_channel::bounded(2);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,11 @@ impl Drop for Svg {
|
|||
}
|
||||
|
||||
impl Svg {
|
||||
pub fn new(image: glycin::Image, updater: UpdateSender, tiles: Arc<SharedFrameBuffer>) -> Self {
|
||||
pub fn new(
|
||||
mut image: glycin::Image,
|
||||
updater: UpdateSender,
|
||||
tiles: Arc<SharedFrameBuffer>,
|
||||
) -> Self {
|
||||
let current_request: Arc<std::sync::RwLock<Request>> = Default::default();
|
||||
let request_store = current_request.clone();
|
||||
let cancellable = image.cancellable();
|
||||
|
|
@ -187,7 +191,7 @@ impl Svg {
|
|||
#[allow(unused_mut)]
|
||||
let loader = glycin::Loader::new(file.clone());
|
||||
|
||||
let image = loader.load().await?;
|
||||
let mut image = loader.load().await?;
|
||||
let frame_request = glycin::FrameRequest::new().scale(width as u32, height as u32);
|
||||
let frame = image.specific_frame(frame_request).await?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue