XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESystem

【Rust】XFE系统,基于Rust和汇编

公开
关注 0 Fork 0 Star 0
UTF-8
using XFESystem.Desktop;
using XFESystem.Platform;

namespace XFESystem.NativeRuntime.Application;

/// <summary>Keep the native splash visible while the CPU builds the first full desktop frame.</summary>
internal sealed class BootFramebufferPresenter(IFramebufferPresenter scanout) : IFramebufferPresenter
{
    private bool released;
    public int Width => scanout.Width;
    public int Height => scanout.Height;
    public void Present(ReadOnlySpan<int> pixels, DesktopBounds damage)
    {
        if (!released) { NativePlatform.CompleteBoot(); released = true; }
        scanout.Present(pixels, damage);
    }
}