diff --git a/Services/Compositor/SceneCompositor.cs b/Services/Compositor/SceneCompositor.cs index 85cf29a..6614424 100644 --- a/Services/Compositor/SceneCompositor.cs +++ b/Services/Compositor/SceneCompositor.cs @@ -257,6 +257,13 @@ public sealed class SceneCompositor var ew = (float)element.Width; var eh = (float)element.Height; var isRound = element.ClipShape == ClipShape.Round; + + // Webcam diagnostic: Log when webcam frames are processed + if (element is WebcamSceneConfig) + { + AppLog.Write($"Compositor webcam: {frame.Width}x{frame.Height}, IsOpaque={frame.IsOpaque}, element={element.GetType().Name}"); + } + // All rect-placed elements route through the paste cache (take-9 lesson): the // IsOpaque bypass kept re-sampling the webcam (~156k px) EVERY tick even when // the device frame had not changed; an opaque source rasterizes to an opaque diff --git a/Services/MediaCaptureFrameSource.cs b/Services/MediaCaptureFrameSource.cs index 0f67aff..3dfb289 100644 --- a/Services/MediaCaptureFrameSource.cs +++ b/Services/MediaCaptureFrameSource.cs @@ -317,8 +317,16 @@ public sealed class MediaCaptureFrameSource : ICameraFrameSource } // MediaCapture video carries no alpha plane — the OS fills 255. - FrameAvailable?.Invoke(new VideoFrame(bitmap.PixelWidth, bitmap.PixelHeight, pixels) - { IsOpaque = true, Epoch = ++_epoch }); + var frame = new VideoFrame(bitmap.PixelWidth, bitmap.PixelHeight, pixels) + { IsOpaque = true, Epoch = ++_epoch }; + + // Diagnostic: Log frame properties for compositor debugging + if ((now - _lastAlphaProbe).TotalSeconds >= 5.0) + { + AppLog.Write($"Webcam frame emit: {frame.Width}x{frame.Height}, IsOpaque={frame.IsOpaque}, Epoch={frame.Epoch}"); + } + + FrameAvailable?.Invoke(frame); } } catch (Exception ex)