mirror of
https://github.com/DarthAffe/ScreenCapture.NET.git
synced 2025-12-12 13:28:35 +00:00
Removed useless switches to calculate blocksize when downscaling
This commit is contained in:
parent
c9ef36176d
commit
797a2bb7c1
@ -131,18 +131,7 @@ public sealed class DX9ScreenCapture : AbstractScreenCapture<ColorBGRA>
|
||||
ReadOnlySpan<byte> source = _buffer;
|
||||
Span<byte> target = buffer;
|
||||
|
||||
int blockSize = captureZone.DownscaleLevel switch
|
||||
{
|
||||
1 => 2,
|
||||
2 => 4,
|
||||
3 => 8,
|
||||
4 => 16,
|
||||
5 => 32,
|
||||
6 => 64,
|
||||
7 => 128,
|
||||
8 => 256,
|
||||
_ => (int)Math.Pow(2, captureZone.DownscaleLevel),
|
||||
};
|
||||
int blockSize = 1 << captureZone.DownscaleLevel;
|
||||
|
||||
int offsetX = captureZone.X;
|
||||
int offsetY = captureZone.Y;
|
||||
|
||||
@ -96,18 +96,7 @@ public sealed class X11ScreenCapture : AbstractScreenCapture<ColorBGRA>
|
||||
ReadOnlySpan<byte> source = Data;
|
||||
Span<byte> target = buffer;
|
||||
|
||||
int blockSize = captureZone.DownscaleLevel switch
|
||||
{
|
||||
1 => 2,
|
||||
2 => 4,
|
||||
3 => 8,
|
||||
4 => 16,
|
||||
5 => 32,
|
||||
6 => 64,
|
||||
7 => 128,
|
||||
8 => 256,
|
||||
_ => (int)Math.Pow(2, captureZone.DownscaleLevel),
|
||||
};
|
||||
int blockSize = 1 << captureZone.DownscaleLevel;
|
||||
|
||||
int offsetX = captureZone.X;
|
||||
int offsetY = captureZone.Y;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user