2023-12-16 22:28:41 +11:00
|
|
|
use librashader_common::Size;
|
2024-02-02 16:51:17 +11:00
|
|
|
use crate::texture::OwnedImage;
|
2023-12-16 22:28:41 +11:00
|
|
|
|
2024-02-02 16:51:17 +11:00
|
|
|
pub struct OutputImage<'a> {
|
2023-12-16 22:28:41 +11:00
|
|
|
pub size: Size<u32>,
|
2024-02-02 16:51:17 +11:00
|
|
|
pub view: &'a wgpu::TextureView,
|
|
|
|
pub format: wgpu::TextureFormat,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> OutputImage<'a> {
|
|
|
|
pub fn new(image: &'a OwnedImage) -> Self {
|
|
|
|
Self {
|
|
|
|
size: image.size,
|
|
|
|
view: &image.view,
|
|
|
|
format: image.image.format()
|
|
|
|
}
|
|
|
|
}
|
2023-12-16 22:28:41 +11:00
|
|
|
}
|