Windows 0.3.1 clean monitor source delta; no private history or other platform changes

This commit is contained in:
2026-10-27 02:00:33 +00:00
parent 366b3c5c9a
commit 1cf54a46e4
40 changed files with 983 additions and 206 deletions
+17 -8
View File
@@ -188,14 +188,23 @@ internal sealed class ScenicPanel : Panel
if (_loginBackdrop is null || _loginBackdrop.Size != ClientSize
|| _loginBackdropDpi != DeviceDpi || _loginBackdropFooter != FooterArtwork)
{
using var next = new Bitmap(Width, Height);
using (var graphics = Graphics.FromImage(next))
ScenicTheme.Backdrop(graphics, ClientSize, DeviceDpi, footer: FooterArtwork, login: true);
var previous = _loginBackdrop;
_loginBackdrop = new Bitmap(next);
_loginBackdropDpi = DeviceDpi;
_loginBackdropFooter = FooterArtwork;
previous?.Dispose();
Bitmap? next = null;
try
{
next = new Bitmap(Width, Height);
using (var graphics = Graphics.FromImage(next))
ScenicTheme.Backdrop(graphics, ClientSize, DeviceDpi, footer: FooterArtwork, login: true);
// Transfer the completed bitmap rather than copying the whole
// canvas on the UI thread. A failed render leaves the previous
// cache owned and intact; only the incomplete replacement dies.
var previous = _loginBackdrop;
_loginBackdrop = next;
next = null;
_loginBackdropDpi = DeviceDpi;
_loginBackdropFooter = FooterArtwork;
previous?.Dispose();
}
finally { next?.Dispose(); }
}
e.Graphics.DrawImageUnscaled(_loginBackdrop, Point.Empty);
}