From ad757076458eb5fc9bcfc818bd13d0ccc248098b Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Thu, 13 Apr 2023 11:29:22 +0200 Subject: [PATCH] Removed SkipLocalInit-Attributes - they're causing issues and are not worth the effort for now --- RGB.NET.Core/Rendering/Textures/PixelTexture.cs | 1 - RGB.NET.Presets/Textures/Sampler/AverageByteSampler.cs | 2 -- RGB.NET.Presets/Textures/Sampler/AverageFloatSampler.cs | 2 -- 3 files changed, 5 deletions(-) diff --git a/RGB.NET.Core/Rendering/Textures/PixelTexture.cs b/RGB.NET.Core/Rendering/Textures/PixelTexture.cs index 4ea5f06..3672e2c 100644 --- a/RGB.NET.Core/Rendering/Textures/PixelTexture.cs +++ b/RGB.NET.Core/Rendering/Textures/PixelTexture.cs @@ -76,7 +76,6 @@ public abstract class PixelTexture : ITexture /// The with of the region. /// The height of the region. /// The sampled color. - [SkipLocalsInit] public virtual Color this[int x, int y, int width, int height] { get diff --git a/RGB.NET.Presets/Textures/Sampler/AverageByteSampler.cs b/RGB.NET.Presets/Textures/Sampler/AverageByteSampler.cs index 0486c5a..8d5b8b6 100644 --- a/RGB.NET.Presets/Textures/Sampler/AverageByteSampler.cs +++ b/RGB.NET.Presets/Textures/Sampler/AverageByteSampler.cs @@ -1,6 +1,5 @@ using System; using System.Numerics; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using RGB.NET.Core; @@ -20,7 +19,6 @@ public class AverageByteSampler : ISampler #region Methods /// - [SkipLocalsInit] public unsafe void Sample(in SamplerInfo info, in Span pixelData) { int count = info.Width * info.Height; diff --git a/RGB.NET.Presets/Textures/Sampler/AverageFloatSampler.cs b/RGB.NET.Presets/Textures/Sampler/AverageFloatSampler.cs index b047773..50e9563 100644 --- a/RGB.NET.Presets/Textures/Sampler/AverageFloatSampler.cs +++ b/RGB.NET.Presets/Textures/Sampler/AverageFloatSampler.cs @@ -1,6 +1,5 @@ using System; using System.Numerics; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using RGB.NET.Core; @@ -14,7 +13,6 @@ public class AverageFloatSampler : ISampler #region Methods /// - [SkipLocalsInit] public unsafe void Sample(in SamplerInfo info, in Span pixelData) { int count = info.Width * info.Height;