From c56432dbd68f27ee7c42b196f9e16a2101103f0d Mon Sep 17 00:00:00 2001 From: routersys Date: Thu, 2 Jul 2026 13:17:14 +0900 Subject: [PATCH] =?UTF-8?q?SoftwareCompositor=E3=82=92=E5=85=B1=E6=9C=89?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=82=B9=E3=82=BF=E3=83=B3=E3=82=B9=E5=8C=96?= =?UTF-8?q?=E3=81=97TryCompose=E3=81=A7=E5=B8=B8=E3=81=AB=E5=87=A6?= =?UTF-8?q?=E7=90=86=E3=82=92=E5=BC=95=E3=81=8D=E5=8F=97=E3=81=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaScript/SoftwareCompositor.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/LuaScript/SoftwareCompositor.cs b/LuaScript/SoftwareCompositor.cs index 7092a29..680ee1d 100644 --- a/LuaScript/SoftwareCompositor.cs +++ b/LuaScript/SoftwareCompositor.cs @@ -5,13 +5,20 @@ namespace LuaScript { internal sealed class SoftwareCompositor : IBufferCompositor { - public void Compose(byte[] dst, int dstW, int dstH, byte[] src, int srcW, int srcH, in DrawCommand command) + public static readonly SoftwareCompositor Instance = new(); + + private SoftwareCompositor() + { + } + + public bool TryCompose(byte[] dst, int dstW, int dstH, byte[] src, int srcW, int srcH, in DrawCommand command) { bool linear = command.Antialias != 0d; if (command.Poly is { } poly) DrawPolyInto(dst, dstW, dstH, src, srcW, srcH, poly, command.Alpha, linear); else DrawInto(dst, dstW, dstH, src, srcW, srcH, command.Ox, command.Oy, command.Zoom, command.Aspect, command.Alpha, linear); + return true; } public static void DrawInto(