From 4339f5b9ede7f04f28e4a79d9a80fb54a2df1291 Mon Sep 17 00:00:00 2001 From: cyfung1031 <44498510+cyfung1031@users.noreply.github.com> Date: Sat, 10 Oct 2026 19:02:02 +0900 Subject: [PATCH] #570: log desktop renderer details (#726) --- apps/pdfcraft/src/main.rs | 12 +++++++++++- docs/development.md | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/apps/pdfcraft/src/main.rs b/apps/pdfcraft/src/main.rs index 31347705..74c03e36 100644 --- a/apps/pdfcraft/src/main.rs +++ b/apps/pdfcraft/src/main.rs @@ -295,7 +295,17 @@ fn app_creator<'a>( app.enable_recovery(pdfcraft_ui_egui::RecoveryStore::new(dir)); } if let Some(state) = &cc.wgpu_render_state { - notify_software_renderer(&mut app, state.adapter.get_info().device_type); + let adapter = state.adapter.get_info(); + let max_texture_dimension_2d = state.device.limits().max_texture_dimension_2d; + log::info!( + "renderer: wgpu; adapter: {} ({:?}, {:?}); max_texture_dimension_2d: {max_texture_dimension_2d}", + adapter.name, + adapter.device_type, + adapter.backend + ); + notify_software_renderer(&mut app, adapter.device_type); + } else { + log::info!("renderer: OpenGL (glow)"); } // A portable marker whose data folder can't be written (#157): say where settings went. if let Some(w) = &pdfcraft_ui_egui::portable::current().unwritable { diff --git a/docs/development.md b/docs/development.md index 7be195b0..23565c55 100644 --- a/docs/development.md +++ b/docs/development.md @@ -36,6 +36,12 @@ at a correspondingly lower scale instead of panicking in `Surface::configure` (v stretched over the window: softer, but complete and lined up with the pointer. wgpu's GL backend copies it unscaled into a corner of the window instead. +For blurry or incorrectly scaled UI reports, attach `pdfcraft.log`. Look for the successful +startup `renderer:` line, which records the wgpu adapter, device type, backend and enabled texture +limit, or the OpenGL renderer. Also look for the `drawing it at … and scaling it up` warning: it +means PdfCraft hit the surface-size safety fallback and rendered below the physical window size, so +softness is expected. + ## Renderer fallback PdfCraft draws with wgpu, and starts again with eframe's own OpenGL renderer (glow) when wgpu fails