Change &mut wgpu::Device
to &wgpu::Device
(#299)
* Change `&mut wgpu::Device` to `&wgpu::Device` * Fix for rustfmt
This commit is contained in:
parent
99e020c7b5
commit
b23945c78a
@ -280,7 +280,7 @@ impl Pipeline {
|
|||||||
|
|
||||||
pub fn draw(
|
pub fn draw(
|
||||||
&mut self,
|
&mut self,
|
||||||
device: &mut wgpu::Device,
|
device: &wgpu::Device,
|
||||||
encoder: &mut wgpu::CommandEncoder,
|
encoder: &mut wgpu::CommandEncoder,
|
||||||
images: &[Image],
|
images: &[Image],
|
||||||
transformation: Transformation,
|
transformation: Transformation,
|
||||||
|
@ -15,10 +15,7 @@ pub struct Pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Pipeline {
|
impl Pipeline {
|
||||||
pub fn new(
|
pub fn new(device: &wgpu::Device, format: wgpu::TextureFormat) -> Pipeline {
|
||||||
device: &mut wgpu::Device,
|
|
||||||
format: wgpu::TextureFormat,
|
|
||||||
) -> Pipeline {
|
|
||||||
let constant_layout =
|
let constant_layout =
|
||||||
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
|
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
|
||||||
label: None,
|
label: None,
|
||||||
@ -180,7 +177,7 @@ impl Pipeline {
|
|||||||
|
|
||||||
pub fn draw(
|
pub fn draw(
|
||||||
&mut self,
|
&mut self,
|
||||||
device: &mut wgpu::Device,
|
device: &wgpu::Device,
|
||||||
encoder: &mut wgpu::CommandEncoder,
|
encoder: &mut wgpu::CommandEncoder,
|
||||||
instances: &[Quad],
|
instances: &[Quad],
|
||||||
transformation: Transformation,
|
transformation: Transformation,
|
||||||
|
@ -54,7 +54,7 @@ impl Renderer {
|
|||||||
/// Creates a new [`Renderer`].
|
/// Creates a new [`Renderer`].
|
||||||
///
|
///
|
||||||
/// [`Renderer`]: struct.Renderer.html
|
/// [`Renderer`]: struct.Renderer.html
|
||||||
pub fn new(device: &mut wgpu::Device, settings: Settings) -> Self {
|
pub fn new(device: &wgpu::Device, settings: Settings) -> Self {
|
||||||
let text_pipeline =
|
let text_pipeline =
|
||||||
text::Pipeline::new(device, settings.format, settings.default_font);
|
text::Pipeline::new(device, settings.format, settings.default_font);
|
||||||
let quad_pipeline = quad::Pipeline::new(device, settings.format);
|
let quad_pipeline = quad::Pipeline::new(device, settings.format);
|
||||||
@ -85,7 +85,7 @@ impl Renderer {
|
|||||||
/// [`Target`]: struct.Target.html
|
/// [`Target`]: struct.Target.html
|
||||||
pub fn draw<T: AsRef<str>>(
|
pub fn draw<T: AsRef<str>>(
|
||||||
&mut self,
|
&mut self,
|
||||||
device: &mut wgpu::Device,
|
device: &wgpu::Device,
|
||||||
encoder: &mut wgpu::CommandEncoder,
|
encoder: &mut wgpu::CommandEncoder,
|
||||||
target: Target<'_>,
|
target: Target<'_>,
|
||||||
(primitive, mouse_cursor): &(Primitive, MouseCursor),
|
(primitive, mouse_cursor): &(Primitive, MouseCursor),
|
||||||
@ -328,7 +328,7 @@ impl Renderer {
|
|||||||
|
|
||||||
fn flush(
|
fn flush(
|
||||||
&mut self,
|
&mut self,
|
||||||
device: &mut wgpu::Device,
|
device: &wgpu::Device,
|
||||||
scale_factor: f32,
|
scale_factor: f32,
|
||||||
transformation: Transformation,
|
transformation: Transformation,
|
||||||
layer: &Layer<'_>,
|
layer: &Layer<'_>,
|
||||||
|
@ -23,7 +23,7 @@ pub struct Pipeline {
|
|||||||
|
|
||||||
impl Pipeline {
|
impl Pipeline {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
device: &mut wgpu::Device,
|
device: &wgpu::Device,
|
||||||
format: wgpu::TextureFormat,
|
format: wgpu::TextureFormat,
|
||||||
default_font: Option<&[u8]>,
|
default_font: Option<&[u8]>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
@ -78,7 +78,7 @@ impl Pipeline {
|
|||||||
|
|
||||||
pub fn draw_queued(
|
pub fn draw_queued(
|
||||||
&mut self,
|
&mut self,
|
||||||
device: &mut wgpu::Device,
|
device: &wgpu::Device,
|
||||||
encoder: &mut wgpu::CommandEncoder,
|
encoder: &mut wgpu::CommandEncoder,
|
||||||
target: &wgpu::TextureView,
|
target: &wgpu::TextureView,
|
||||||
transformation: Transformation,
|
transformation: Transformation,
|
||||||
|
@ -63,7 +63,7 @@ impl<T> Buffer<T> {
|
|||||||
|
|
||||||
impl Pipeline {
|
impl Pipeline {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
device: &mut wgpu::Device,
|
device: &wgpu::Device,
|
||||||
format: wgpu::TextureFormat,
|
format: wgpu::TextureFormat,
|
||||||
antialiasing: Option<settings::Antialiasing>,
|
antialiasing: Option<settings::Antialiasing>,
|
||||||
) -> Pipeline {
|
) -> Pipeline {
|
||||||
@ -195,7 +195,7 @@ impl Pipeline {
|
|||||||
|
|
||||||
pub fn draw(
|
pub fn draw(
|
||||||
&mut self,
|
&mut self,
|
||||||
device: &mut wgpu::Device,
|
device: &wgpu::Device,
|
||||||
encoder: &mut wgpu::CommandEncoder,
|
encoder: &mut wgpu::CommandEncoder,
|
||||||
target: &wgpu::TextureView,
|
target: &wgpu::TextureView,
|
||||||
target_width: u32,
|
target_width: u32,
|
||||||
|
Loading…
Reference in New Issue
Block a user