Skip to content

Commit

Permalink
Fix tests and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Jan 24, 2024
1 parent 34eaf55 commit a00c8f3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
31 changes: 22 additions & 9 deletions crates/kas-core/src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,6 @@ mod test {
impl WindowSurface for Surface {
type Shared = DrawShared;

fn new<W>(_: &mut Self::Shared, _: W) -> Result<Self>
where
W: rwh::HasRawWindowHandle + rwh::HasRawDisplayHandle,
Self: Sized,
{
todo!()
}

fn size(&self) -> crate::prelude::Size {
todo!()
}
Expand All @@ -280,10 +272,31 @@ mod test {
}
}

struct AGB;
impl AppGraphicsBuilder for AGB {
type DefaultTheme = crate::theme::SimpleTheme;

type Shared = DrawShared;

type Surface<'a> = Surface;

fn build(self) -> Result<Self::Shared> {
todo!()
}

fn new_surface<'window, W>(_: &mut Self::Shared, _: W) -> Result<Self::Surface<'window>>
where
W: rwh::HasWindowHandle + rwh::HasDisplayHandle + Send + Sync + 'window,
Self: Sized,
{
todo!()
}
}

#[test]
fn size_of_pending() {
assert_eq!(
std::mem::size_of::<Pending<(), Surface, crate::theme::SimpleTheme>>(),
std::mem::size_of::<Pending<(), AGB, crate::theme::SimpleTheme>>(),
32
);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/mandlebrot/mandlebrot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ impl CustomPipeBuilder for PipeBuilder {
fn device_descriptor() -> wgpu::DeviceDescriptor<'static> {
wgpu::DeviceDescriptor {
label: None,
features: wgpu::Features::PUSH_CONSTANTS | SHADER_FLOAT64,
limits: wgpu::Limits {
required_features: wgpu::Features::PUSH_CONSTANTS | SHADER_FLOAT64,
required_limits: wgpu::Limits {
max_push_constant_size: size_of::<PushConstants>().cast(),
..Default::default()
},
Expand Down

0 comments on commit a00c8f3

Please sign in to comment.