From ce7b15121c0189d0fb4dcd23efc8d644ccfe834a Mon Sep 17 00:00:00 2001 From: routersys Date: Sun, 5 Jul 2026 16:12:26 +0900 Subject: [PATCH] =?UTF-8?q?=E7=94=BB=E5=83=8F=E5=8A=A0=E5=B7=A5=E3=81=ABGP?= =?UTF-8?q?U=E5=A7=94=E8=AD=B2=E3=81=AE=E6=98=8E=E7=A4=BA=E3=83=95?= =?UTF-8?q?=E3=83=A9=E3=82=B0=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaScript.Runtime/Engine/AviUtlScriptContext.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/LuaScript.Runtime/Engine/AviUtlScriptContext.cs b/LuaScript.Runtime/Engine/AviUtlScriptContext.cs index 634b43e..e32a2be 100644 --- a/LuaScript.Runtime/Engine/AviUtlScriptContext.cs +++ b/LuaScript.Runtime/Engine/AviUtlScriptContext.cs @@ -511,7 +511,7 @@ namespace LuaScript private byte[]? _resizeSource; private byte[]? _resizeBuffer; - public unsafe void FillBuffer(double r, double g, double b, double a, int x, int y, int w, int h) + public unsafe void FillBuffer(double r, double g, double b, double a, int x, int y, int w, int h, bool accelerate = false) { EnsurePixelBuffer(); if (_pixelBuffer is null) @@ -526,7 +526,7 @@ namespace LuaScript if (x1 <= x0 || y1 <= y0) return; - if (PixelProcessor?.TryFill(_pixelBuffer, cw, ch, r, g, b, a, x0, y0, x1 - x0, y1 - y0) == true) + if (accelerate && PixelProcessor?.TryFill(_pixelBuffer, cw, ch, r, g, b, a, x0, y0, x1 - x0, y1 - y0) == true) { _isPixelsDirty = true; return; @@ -621,7 +621,7 @@ namespace LuaScript } } - public unsafe void Convolve(double[] kernel, int size, double divisor, double offset) + public unsafe void Convolve(double[] kernel, int size, double divisor, double offset, bool accelerate = false) { EnsurePixelBuffer(); if (_pixelBuffer is null) @@ -629,7 +629,7 @@ namespace LuaScript int cw = ImageWidth; int ch = ImageHeight; - if (PixelProcessor?.TryConvolve(_pixelBuffer, cw, ch, kernel, size, divisor, offset) == true) + if (accelerate && PixelProcessor?.TryConvolve(_pixelBuffer, cw, ch, kernel, size, divisor, offset) == true) { _isPixelsDirty = true; return; @@ -639,7 +639,7 @@ namespace LuaScript PixelBufferSoftwareProcessor.Convolve(_pixelBuffer, cw, ch, kernel, size, divisor, offset, ref _convolveSource); } - public unsafe void Resize(int newWidth, int newHeight, bool linear) + public unsafe void Resize(int newWidth, int newHeight, bool linear, bool accelerate = false) { EnsurePixelBuffer(); if (_pixelBuffer is null) @@ -650,7 +650,7 @@ namespace LuaScript int cw = ImageWidth; int ch = ImageHeight; - if (PixelProcessor?.TryResize(_pixelBuffer, cw, ch, newWidth, newHeight, linear, out var processed) == true && processed is not null) + if (accelerate && PixelProcessor?.TryResize(_pixelBuffer, cw, ch, newWidth, newHeight, linear, out var processed) == true && processed is not null) { ReplaceBuffer(processed, newWidth, newHeight); return;