From 66eb0562dfb97b915cbc78335a3c11d83ebb1a10 Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Wed, 5 Jan 2022 22:05:33 +0100 Subject: [PATCH] wlcs_anvil: Update to new api --- wlcs_anvil/src/main_loop.rs | 6 +++++- wlcs_anvil/src/renderer.rs | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/wlcs_anvil/src/main_loop.rs b/wlcs_anvil/src/main_loop.rs index c067170..cc1108e 100644 --- a/wlcs_anvil/src/main_loop.rs +++ b/wlcs_anvil/src/main_loop.rs @@ -18,6 +18,7 @@ use smithay::{ Client, Display, }, }, + utils::Rectangle, wayland::{ output::{Mode, PhysicalProperties}, seat::CursorImageStatus, @@ -103,7 +104,10 @@ pub fn run(channel: Channel) { renderer .render((800, 600).into(), Transform::Normal, |renderer, frame| { - frame.clear([0.8, 0.8, 0.9, 1.0])?; + frame.clear( + [0.8, 0.8, 0.9, 1.0], + &[Rectangle::from_loc_and_size((0, 0), (800, 600))], + )?; // draw the windows draw_windows( diff --git a/wlcs_anvil/src/renderer.rs b/wlcs_anvil/src/renderer.rs index 640cf10..0ceb21d 100644 --- a/wlcs_anvil/src/renderer.rs +++ b/wlcs_anvil/src/renderer.rs @@ -97,7 +97,7 @@ impl Frame for DummyFrame { type Error = SwapBuffersError; type TextureId = DummyTexture; - fn clear(&mut self, _color: [f32; 4]) -> Result<(), Self::Error> { + fn clear(&mut self, _color: [f32; 4], _damage: &[Rectangle]) -> Result<(), Self::Error> { Ok(()) } @@ -106,6 +106,7 @@ impl Frame for DummyFrame { _texture: &Self::TextureId, _src: Rectangle, _dst: Rectangle, + _damage: &[Rectangle], _src_transform: Transform, _alpha: f32, ) -> Result<(), Self::Error> {