Remove trait-specific draw logic in iced_native
This commit is contained in:
parent
3aae45c191
commit
03b3493138
71 changed files with 641 additions and 3126 deletions
|
|
@ -1,5 +1,4 @@
|
|||
use crate::{Color, Error, Size, Viewport};
|
||||
use iced_native::mouse;
|
||||
|
||||
use core::ffi::c_void;
|
||||
|
||||
|
|
@ -49,15 +48,15 @@ pub trait GLCompositor: Sized {
|
|||
/// Resizes the viewport of the [`GLCompositor`].
|
||||
fn resize_viewport(&mut self, physical_size: Size<u32>);
|
||||
|
||||
/// Draws the provided output with the given [`Renderer`].
|
||||
/// Presents the primitives of the [`Renderer`] to the next frame of the
|
||||
/// [`GLCompositor`].
|
||||
///
|
||||
/// [`Renderer`]: crate::Renderer
|
||||
fn draw<T: AsRef<str>>(
|
||||
fn present<T: AsRef<str>>(
|
||||
&mut self,
|
||||
renderer: &mut Self::Renderer,
|
||||
viewport: &Viewport,
|
||||
background_color: Color,
|
||||
output: &<Self::Renderer as iced_native::Renderer>::Output,
|
||||
overlay: &[T],
|
||||
) -> mouse::Interaction;
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue