mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
Add some puffin profiling scopes
This commit is contained in:
@@ -112,6 +112,8 @@ impl Clipboard {
|
||||
|
||||
#[cfg(all(feature = "arboard", not(target_os = "android")))]
|
||||
fn init_arboard() -> Option<arboard::Clipboard> {
|
||||
crate::profile_function!();
|
||||
|
||||
log::debug!("Initializing arboard clipboard…");
|
||||
match arboard::Clipboard::new() {
|
||||
Ok(clipboard) => Some(clipboard),
|
||||
@@ -135,6 +137,8 @@ fn init_arboard() -> Option<arboard::Clipboard> {
|
||||
fn init_smithay_clipboard(
|
||||
_display_target: &dyn HasRawDisplayHandle,
|
||||
) -> Option<smithay_clipboard::Clipboard> {
|
||||
crate::profile_function!();
|
||||
|
||||
use raw_window_handle::RawDisplayHandle;
|
||||
if let RawDisplayHandle::Wayland(display) = _display_target.raw_display_handle() {
|
||||
log::debug!("Initializing smithay clipboard…");
|
||||
|
||||
@@ -92,6 +92,8 @@ impl State {
|
||||
native_pixels_per_point: Option<f32>,
|
||||
max_texture_side: Option<usize>,
|
||||
) -> Self {
|
||||
crate::profile_function!();
|
||||
|
||||
let egui_input = egui::RawInput {
|
||||
focused: false, // winit will tell us when we have focus
|
||||
..Default::default()
|
||||
@@ -1128,6 +1130,8 @@ pub fn process_viewport_commands(
|
||||
}
|
||||
|
||||
pub fn create_winit_window_builder(builder: &ViewportBuilder) -> winit::window::WindowBuilder {
|
||||
crate::profile_function!();
|
||||
|
||||
let mut window_builder = winit::window::WindowBuilder::new()
|
||||
.with_title(
|
||||
builder
|
||||
|
||||
Reference in New Issue
Block a user