Add comprehensive debug logging for screenshot rendering
- Timer callback: log each tick and commit status - LockedSurface::update(): log background presence, fade alpha, feedback states - Renderer::render(): log background drawing and fade alpha - Ready event: log background set confirmation These logs will help diagnose why screenshots are not displaying.
This commit is contained in:
@@ -92,20 +92,28 @@ impl Renderer {
|
||||
|
||||
/// Render the current frame
|
||||
pub fn render(&mut self) {
|
||||
log::debug!(
|
||||
"Renderer::render() called, background: {}",
|
||||
self.background.is_some()
|
||||
);
|
||||
|
||||
// Clear the surface - draw a VISIBLE color (dark gray) instead of black
|
||||
self.context.set_source_rgba(0.15, 0.15, 0.15, 1.0);
|
||||
self.context.paint().expect("Failed to clear surface");
|
||||
|
||||
// Draw background if available
|
||||
if let Some(ref background) = self.background {
|
||||
log::debug!("Drawing background (fade_alpha: {})", self.fade_alpha);
|
||||
self.context
|
||||
.set_source_surface(background, 0.0, 0.0)
|
||||
.expect("Failed to set background source");
|
||||
self.context
|
||||
.paint_with_alpha(self.fade_alpha)
|
||||
.expect("Failed to draw background");
|
||||
log::debug!("Background drawn");
|
||||
} else {
|
||||
// Draw solid color background (dark gray visible color)
|
||||
log::debug!("No background, drawing solid color");
|
||||
self.context.set_source_rgba(0.15, 0.15, 0.15, 1.0);
|
||||
self.context
|
||||
.paint()
|
||||
|
||||
Reference in New Issue
Block a user