desktop: `draw_layer` -> `draw_layer_surface`

This commit is contained in:
Victor Brekenfeld 2022-01-06 18:27:04 +01:00
parent a779e6b5c0
commit ccec794af7
3 changed files with 5 additions and 5 deletions

View File

@ -504,7 +504,7 @@ impl LayerSurface {
/// Note: This function will render nothing, if you are not using
/// [`crate::backend::renderer::utils::on_commit_buffer_handler`]
/// to let smithay handle buffer management.
pub fn draw_layer<R, E, F, T, P>(
pub fn draw_layer_surface<R, E, F, T, P>(
renderer: &mut R,
frame: &mut F,
layer: &LayerSurface,

View File

@ -35,13 +35,13 @@
//!
//! Each [`Output`](crate::wayland::output::Output) can be associated a [`LayerMap`] by calling [`layer_map_for_output`],
//! which [`LayerSurface`]s can be mapped upon. Associated layer maps are automatically rendered by [`Space::render_output`],
//! but a [draw function](`draw_layer`) is also provided for manual layer-surface management.
//! but a [draw function](`draw_layer_surface`) is also provided for manual layer-surface management.
//!
//! ### Popups
//!
//! Provides a [`PopupManager`], which can be used to automatically keep track of popups and their
//! relations to one-another. Popups are then automatically rendered with their matching toplevel surfaces,
//! when either [`draw_window`], [`draw_layer`] or [`Space::render_output`] is called.
//! when either [`draw_window`], [`draw_layer_surface`] or [`Space::render_output`] is called.
//!
//! ## Remarks
//!
@ -55,7 +55,7 @@ pub mod space;
pub mod utils;
mod window;
pub use self::layer::{draw_layer, layer_map_for_output, LayerMap, LayerSurface};
pub use self::layer::{draw_layer_surface, layer_map_for_output, LayerMap, LayerSurface};
pub use self::popup::*;
pub use self::space::Space;
pub use self::window::*;

View File

@ -63,7 +63,7 @@ where
damage: &[Rectangle<i32, Logical>],
log: &slog::Logger,
) -> Result<(), R::Error> {
let res = draw_layer(renderer, frame, self, scale, location, damage, log);
let res = draw_layer_surface(renderer, frame, self, scale, location, damage, log);
if res.is_ok() {
layer_state(space_id, self).drawn = true;
}