From 6a0e442ad68c2b104b7e91ef80798610a79aca6b Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 22 Nov 2019 22:14:24 +0100 Subject: Write docs for `iced_wgpu` --- wgpu/src/renderer/target.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'wgpu/src/renderer/target.rs') diff --git a/wgpu/src/renderer/target.rs b/wgpu/src/renderer/target.rs index eeeb629a..569f3c62 100644 --- a/wgpu/src/renderer/target.rs +++ b/wgpu/src/renderer/target.rs @@ -2,6 +2,8 @@ use crate::{Renderer, Transformation}; use raw_window_handle::HasRawWindowHandle; +/// A rendering target. +#[derive(Debug)] pub struct Target { surface: wgpu::Surface, width: u16, @@ -12,19 +14,19 @@ pub struct Target { } impl Target { - pub fn dimensions(&self) -> (u16, u16) { + pub(crate) fn dimensions(&self) -> (u16, u16) { (self.width, self.height) } - pub fn dpi(&self) -> f32 { + pub(crate) fn dpi(&self) -> f32 { self.dpi } - pub fn transformation(&self) -> Transformation { + pub(crate) fn transformation(&self) -> Transformation { self.transformation } - pub fn next_frame(&mut self) -> wgpu::SwapChainOutput { + pub(crate) fn next_frame(&mut self) -> wgpu::SwapChainOutput<'_> { self.swap_chain.get_next_texture() } } -- cgit