diff options
| author | 2023-11-28 23:25:42 +0100 | |
|---|---|---|
| committer | 2023-11-28 23:25:42 +0100 | |
| commit | 133f4da9014fcdc331ac44269209ee61ca56d007 (patch) | |
| tree | 4165df808d50fbaa4cb9b27ded59077b769a4135 /wgpu/src/primitive | |
| parent | 100d15f30654d446cffe2fb60a435c79c81b0188 (diff) | |
| parent | ab7dae554cac801aeed5d9aa4d3850d50be86263 (diff) | |
| download | iced-133f4da9014fcdc331ac44269209ee61ca56d007.tar.gz iced-133f4da9014fcdc331ac44269209ee61ca56d007.tar.bz2 iced-133f4da9014fcdc331ac44269209ee61ca56d007.zip | |
Merge pull request #2149 from iced-rs/fix/custom-pipeline-translation
Provide actual bounds to `Shader` primitives
Diffstat (limited to '')
| -rw-r--r-- | wgpu/src/primitive/pipeline.rs | 5 | 
1 files changed, 2 insertions, 3 deletions
| diff --git a/wgpu/src/primitive/pipeline.rs b/wgpu/src/primitive/pipeline.rs index 5dbd6697..302e38f6 100644 --- a/wgpu/src/primitive/pipeline.rs +++ b/wgpu/src/primitive/pipeline.rs @@ -1,6 +1,5 @@  //! Draw primitives using custom pipelines.  use crate::core::{Rectangle, Size}; -use crate::graphics::Transformation;  use std::any::{Any, TypeId};  use std::collections::HashMap; @@ -41,9 +40,9 @@ pub trait Primitive: Debug + Send + Sync + 'static {          format: wgpu::TextureFormat,          device: &wgpu::Device,          queue: &wgpu::Queue, +        bounds: Rectangle,          target_size: Size<u32>,          scale_factor: f32, -        transform: Transformation,          storage: &mut Storage,      ); @@ -51,9 +50,9 @@ pub trait Primitive: Debug + Send + Sync + 'static {      fn render(          &self,          storage: &Storage, -        bounds: Rectangle<u32>,          target: &wgpu::TextureView,          target_size: Size<u32>, +        viewport: Rectangle<u32>,          encoder: &mut wgpu::CommandEncoder,      );  } | 
