From 1bb3c6913a51e13a673c6a54be6c7fad81b695a5 Mon Sep 17 00:00:00 2001 From: Ionite Date: Wed, 29 Nov 2023 15:59:26 -0500 Subject: [PATCH] Remove render base calls, add inlining methodimpl --- StabilityMatrix.Avalonia/Controls/AdvancedImageBox.axaml.cs | 3 +-- StabilityMatrix.Avalonia/Controls/LineDashFrame.cs | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/StabilityMatrix.Avalonia/Controls/AdvancedImageBox.axaml.cs b/StabilityMatrix.Avalonia/Controls/AdvancedImageBox.axaml.cs index 80704547..4bc16e79 100644 --- a/StabilityMatrix.Avalonia/Controls/AdvancedImageBox.axaml.cs +++ b/StabilityMatrix.Avalonia/Controls/AdvancedImageBox.axaml.cs @@ -1354,6 +1354,7 @@ public class AdvancedImageBox : TemplatedControl InvalidateVisual(); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] private void RenderBackgroundGrid(DrawingContext context) { var size = GridCellSize; @@ -1387,8 +1388,6 @@ public class AdvancedImageBox : TemplatedControl public override void Render(DrawingContext context) { - base.Render(context); - var gridCellSize = GridCellSize; if (ShowGrid & gridCellSize > 0 && (!IsHorizontalBarVisible || !IsVerticalBarVisible)) diff --git a/StabilityMatrix.Avalonia/Controls/LineDashFrame.cs b/StabilityMatrix.Avalonia/Controls/LineDashFrame.cs index efb410da..6cd63d98 100644 --- a/StabilityMatrix.Avalonia/Controls/LineDashFrame.cs +++ b/StabilityMatrix.Avalonia/Controls/LineDashFrame.cs @@ -82,8 +82,6 @@ public class LineDashFrame : Frame /// public override void Render(DrawingContext context) { - base.Render(context); - var width = Bounds.Width; var height = Bounds.Height;