From 3caa385236ec7998defdea4390f6278a94519774 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 11 Mar 2023 18:30:39 +0100 Subject: [PATCH] Set CanvasEffect.isInvalidated to true by default --- src/ComputeSharp.D2D1.Uwp/CanvasEffect.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ComputeSharp.D2D1.Uwp/CanvasEffect.cs b/src/ComputeSharp.D2D1.Uwp/CanvasEffect.cs index 68f39a7f..0899ea5b 100644 --- a/src/ComputeSharp.D2D1.Uwp/CanvasEffect.cs +++ b/src/ComputeSharp.D2D1.Uwp/CanvasEffect.cs @@ -25,7 +25,11 @@ public abstract partial class CanvasEffect : ICanvasImage, ICanvasImageInterop.I /// /// Indicates whether the current state has been invalidated (requiring to be called). /// - private bool isInvalidated; + /// + /// This is initially so that will always be called when + /// first creating the image, even if the effect has not bee invalidated. This ensures default parameters are set. + /// + private bool isInvalidated = true; /// /// Indicates whether the effect is disposed.