namespace DragonISO.Engine.Pipeline;

/// <summary>
/// Generates a solid-color BGRA frame for use as a "no signal" slate.
/// </summary>
public sealed class SolidFrameRenderer
{
    public ProcessedFrame Render(int width, int height, byte b, byte g, byte r, byte a, long timestampTicks)
    {
        var pixels = new byte[width * height * 4];
        for (var i = 0; i < pixels.Length; i += 4)
        {
            pixels[i + 0] = b;
            pixels[i + 1] = g;
            pixels[i + 2] = r;
            pixels[i + 3] = a;
        }
        return new ProcessedFrame(width, height, timestampTicks, pixels, PixelFormat.Bgra);
    }
}
