From 5e40f4591005723b9daffc95ae3a013194147834 Mon Sep 17 00:00:00 2001 From: routersys Date: Thu, 2 Jul 2026 12:52:56 +0900 Subject: [PATCH] =?UTF-8?q?tempbuffer=E5=90=88=E6=88=90=E3=82=92=E6=B3=A8?= =?UTF-8?q?=E5=85=A5=E3=81=95=E3=82=8C=E3=81=9F=E5=90=88=E6=88=90=E5=99=A8?= =?UTF-8?q?=E7=B5=8C=E7=94=B1=E3=81=B8=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaScript/AviUtlScriptContext.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/LuaScript/AviUtlScriptContext.cs b/LuaScript/AviUtlScriptContext.cs index 0a2dac4..e671441 100644 --- a/LuaScript/AviUtlScriptContext.cs +++ b/LuaScript/AviUtlScriptContext.cs @@ -91,6 +91,8 @@ namespace LuaScript internal void ClearEffects() => _effectRequests.Clear(); + internal IBufferCompositor Compositor { get; set; } = new SoftwareCompositor(); + private readonly List _drawCommands = []; public IReadOnlyList DrawCommands => _drawCommands; @@ -139,11 +141,7 @@ namespace LuaScript _buffers["t"] = temp; } - bool linear = command.Antialias != 0d; - if (command.Poly is { } poly) - SoftwareCompositor.DrawPolyInto(temp.Data, temp.Width, temp.Height, src, ImageWidth, ImageHeight, poly, command.Alpha, linear); - else - SoftwareCompositor.DrawInto(temp.Data, temp.Width, temp.Height, src, ImageWidth, ImageHeight, command.Ox, command.Oy, command.Zoom, command.Aspect, command.Alpha, linear); + Compositor.Compose(temp.Data, temp.Width, temp.Height, src, ImageWidth, ImageHeight, command); } private readonly Dictionary _buffers = new(StringComparer.Ordinal);