Implement composable, type-safe renderer fallback
This commit is contained in:
parent
7e4ae8450e
commit
3645d34d6a
35 changed files with 1474 additions and 1210 deletions
|
|
@ -130,7 +130,7 @@ pub fn default(theme: &Theme) -> Appearance {
|
|||
/// settings.
|
||||
pub async fn run<A, E, C>(
|
||||
settings: Settings<A::Flags>,
|
||||
compositor_settings: C::Settings,
|
||||
compositor_settings: impl Into<C::Settings>,
|
||||
) -> Result<(), Error>
|
||||
where
|
||||
A: Application + 'static,
|
||||
|
|
@ -219,7 +219,7 @@ where
|
|||
};
|
||||
}
|
||||
|
||||
let compositor = C::new(compositor_settings, window.clone()).await?;
|
||||
let compositor = C::new(compositor_settings.into(), window.clone()).await?;
|
||||
let mut renderer = compositor.create_renderer();
|
||||
|
||||
for font in settings.fonts {
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ where
|
|||
/// settings.
|
||||
pub fn run<A, E, C>(
|
||||
settings: Settings<A::Flags>,
|
||||
compositor_settings: C::Settings,
|
||||
compositor_settings: impl Into<C::Settings>,
|
||||
) -> Result<(), Error>
|
||||
where
|
||||
A: Application + 'static,
|
||||
|
|
@ -186,8 +186,10 @@ where
|
|||
};
|
||||
}
|
||||
|
||||
let mut compositor =
|
||||
executor::block_on(C::new(compositor_settings, main_window.clone()))?;
|
||||
let mut compositor = executor::block_on(C::new(
|
||||
compositor_settings.into(),
|
||||
main_window.clone(),
|
||||
))?;
|
||||
|
||||
let mut window_manager = WindowManager::new();
|
||||
let _ = window_manager.insert(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue