diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Internal/EventCookie.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Internal/EventCookie.cs
index ea37fd6..998e2e9 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Internal/EventCookie.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Internal/EventCookie.cs
@@ -19,17 +19,16 @@ namespace Microsoft.Iris.Render.Internal
public override bool Equals(object oCompare)
{
- switch (oCompare)
- {
- case uint num:
- label_3:
- return (int)this.m_value == (int)num;
- case EventCookie eventCookie:
- num = eventCookie.m_value;
- goto label_3;
- default:
- return false;
- }
+ uint num;
+
+ if (oCompare is EventCookie eventCookie)
+ num = eventCookie.m_value;
+ else if (oCompare is uint value)
+ num = value;
+ else
+ return false;
+
+ return (int)m_value == (int)num;
}
public override int GetHashCode() => (int)this.m_value;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Internal/Win32Api.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Internal/Win32Api.cs
index 87d9be0..aa80a31 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Internal/Win32Api.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Internal/Win32Api.cs
@@ -213,14 +213,14 @@ namespace Microsoft.Iris.Render.Internal
InitMessageDump();
if (uMsg >= s_rgsMessageNames.Length)
return null;
- string rgsMessageName = s_rgsMessageNames[(IntPtr)uMsg];
+ string rgsMessageName = s_rgsMessageNames[uMsg];
if (rgsMessageName != null)
return rgsMessageName;
uint num = uMsg;
while (uMsg > 0U)
{
--num;
- rgsMessageName = s_rgsMessageNames[(IntPtr)num];
+ rgsMessageName = s_rgsMessageNames[num];
if (rgsMessageName != null)
break;
}
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/BlobInfo.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/BlobInfo.cs
index 0129d7f..9b83702 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/BlobInfo.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/BlobInfo.cs
@@ -98,7 +98,7 @@ namespace Microsoft.Iris.Render.Protocol
else
{
byte* numPtr2 = (byte*)chPtr1;
- for (byte* numPtr3 = numPtr2 + ((IntPtr)(str.Length + 1) * 2).ToInt64(); numPtr2 < numPtr3; numPtr2 += 2)
+ for (byte* numPtr3 = numPtr2 + ((long)(str.Length + 1) * 2); numPtr2 < numPtr3; numPtr2 += 2)
{
*numPtr1++ = numPtr2[1];
*numPtr1++ = *numPtr2;
@@ -123,7 +123,7 @@ namespace Microsoft.Iris.Render.Protocol
else
{
byte* numPtr2 = (byte*)renderhandlePtr;
- for (byte* numPtr3 = numPtr2 + ((IntPtr)renderhandleArray.Length * 4).ToInt64(); numPtr2 < numPtr3; numPtr2 += 4)
+ for (byte* numPtr3 = numPtr2 + ((long)renderhandleArray.Length * 4); numPtr2 < numPtr3; numPtr2 += 4)
{
*numPtr1++ = numPtr2[3];
*numPtr1++ = numPtr2[2];
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/HandleGroup.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/HandleGroup.cs
index a022759..57fbfb1 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/HandleGroup.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/HandleGroup.cs
@@ -80,7 +80,7 @@ namespace Microsoft.Iris.Render.Protocol
get
{
this.ValidateSlot(index);
- GCHandle gcHandle = this.m_objects[(IntPtr)index];
+ GCHandle gcHandle = this.m_objects[index];
return !gcHandle.IsAllocated ? null : (IRenderHandleOwner)gcHandle.Target;
}
set
@@ -101,7 +101,7 @@ namespace Microsoft.Iris.Render.Protocol
{
if (!this.ValidateAccess(index, expectedUniqueness, fAllowInvalid))
return null;
- GCHandle gcHandle = this.m_objects[(IntPtr)index];
+ GCHandle gcHandle = this.m_objects[index];
return !gcHandle.IsAllocated ? null : (IRenderHandleOwner)gcHandle.Target;
}
@@ -185,16 +185,16 @@ namespace Microsoft.Iris.Render.Protocol
private void SetIndex(uint index, IRenderHandleOwner newOwner)
{
- GCHandle gch = this.m_objects[(IntPtr)index];
+ GCHandle gch = this.m_objects[index];
if (!IsEmpty(gch))
{
((IRenderHandleOwner)gch.Target)?.OnDisconnect();
gch.Free();
}
if (newOwner != null)
- this.m_objects[(IntPtr)index] = GCHandle.Alloc(newOwner, this.m_ht);
+ this.m_objects[index] = GCHandle.Alloc(newOwner, this.m_ht);
else
- this.m_objects[(IntPtr)index] = s_gchEmpty;
+ this.m_objects[index] = s_gchEmpty;
}
private void UpdateUniqueness(uint index, out uint unique)
@@ -202,9 +202,9 @@ namespace Microsoft.Iris.Render.Protocol
byte num1 = 0;
if (this.m_uniqueness != null)
{
- byte num2 = this.m_uniqueness[(IntPtr)index];
+ byte num2 = this.m_uniqueness[index];
num1 = num2 >= byte.MaxValue ? (byte)1 : (byte)(num2 + 1U);
- this.m_uniqueness[(IntPtr)index] = num1;
+ this.m_uniqueness[index] = num1;
}
unique = num1;
}
@@ -214,7 +214,7 @@ namespace Microsoft.Iris.Render.Protocol
Debug2.Validate(unique <= byte.MaxValue, typeof(ArgumentOutOfRangeException), "Uniqueness must be a byte");
if (this.m_uniqueness == null)
return;
- this.m_uniqueness[(IntPtr)index] = (byte)(unique & byte.MaxValue);
+ this.m_uniqueness[index] = (byte)(unique & byte.MaxValue);
}
private void ValidateSlot(uint index) => this.ValidateSlot(index, false);
@@ -222,7 +222,7 @@ namespace Microsoft.Iris.Render.Protocol
private bool ValidateSlot(uint index, bool fAllowInvalid)
{
bool flag = false;
- if (index < this.m_alloc && ((int)this.m_usage[(IntPtr)(index >> 5)] & 1 << (int)index) != 0)
+ if (index < this.m_alloc && ((int)this.m_usage[index >> 5] & 1 << (int)index) != 0)
flag = true;
Debug2.Throw(flag || fAllowInvalid, "Slot is not allocated");
return flag;
@@ -233,7 +233,7 @@ namespace Microsoft.Iris.Render.Protocol
private bool ValidateSlotFree(uint index, bool fAllowInvalid)
{
bool flag = false;
- if (index < this.m_alloc && ((int)this.m_usage[(IntPtr)(index >> 5)] & 1 << (int)index) == 0)
+ if (index < this.m_alloc && ((int)this.m_usage[index >> 5] & 1 << (int)index) == 0)
flag = true;
Debug2.Throw(flag || fAllowInvalid, "Slot is not free");
return flag;
@@ -247,7 +247,7 @@ namespace Microsoft.Iris.Render.Protocol
return false;
uint num = 0;
if (this.m_uniqueness != null)
- num = this.m_uniqueness[(IntPtr)index];
+ num = this.m_uniqueness[index];
bool flag = (int)expectedUniqueness == (int)num;
Debug2.Throw(flag || fAllowInvalid, "Slot uniqueness is stale");
return flag;
@@ -259,7 +259,7 @@ namespace Microsoft.Iris.Render.Protocol
uint hint;
for (hint = this.m_hint; hint < m_usage.Length; ++hint)
{
- num1 = this.m_usage[(IntPtr)hint];
+ num1 = this.m_usage[hint];
if (num1 != uint.MaxValue)
break;
}
@@ -278,7 +278,7 @@ namespace Microsoft.Iris.Render.Protocol
maxValue >>= (int)num2;
}
while (num2 != 0U);
- this.m_usage[(IntPtr)hint] |= 1U << (int)num3;
+ this.m_usage[hint] |= 1U << (int)num3;
++this.m_used;
return hint << 5 | num3;
}
@@ -286,14 +286,14 @@ namespace Microsoft.Iris.Render.Protocol
private void AllocSlotAt(uint index)
{
this.ValidateSlotFree(index);
- this.m_usage[(IntPtr)(index >> 5)] |= 1U << (int)index;
+ this.m_usage[index >> 5] |= 1U << (int)index;
++this.m_used;
}
private void FreeSlot(uint index)
{
uint num = index >> 5;
- this.m_usage[(IntPtr)num] &= (uint)~(1 << (int)index);
+ this.m_usage[num] &= (uint)~(1 << (int)index);
--this.m_used;
if (this.m_hint <= num)
return;
@@ -315,15 +315,15 @@ namespace Microsoft.Iris.Render.Protocol
{
Debug2.Validate(newSize > this.m_alloc, typeof(ArgumentException), nameof(newSize));
Debug2.Validate(newSize <= this.m_maxObjects, typeof(InvalidOperationException), "Too many video resources have been allocated");
- GCHandle[] gcHandleArray = new GCHandle[(IntPtr)newSize];
+ GCHandle[] gcHandleArray = new GCHandle[newSize];
uint[] numArray1 = null;
byte[] numArray2 = null;
uint num = (uint)((int)newSize + 32 - 1) >> 5;
if (this.m_usage == null || m_usage.Length < num)
- numArray1 = new uint[(IntPtr)num];
+ numArray1 = new uint[num];
if (this.m_uniqueness != null)
{
- numArray2 = new byte[(IntPtr)newSize];
+ numArray2 = new byte[newSize];
Array.Copy(m_uniqueness, numArray2, this.m_uniqueness.Length);
}
if (this.m_objects != null)
@@ -347,16 +347,16 @@ namespace Microsoft.Iris.Render.Protocol
public ObjectCopy(HandleGroup map)
{
uint used = map.m_used;
- this.m_arObjects = new IRenderHandleOwner[(IntPtr)used];
+ this.m_arObjects = new IRenderHandleOwner[used];
uint num = 0;
for (uint index = 0; index < used; ++index)
{
- GCHandle gch = map.m_objects[(IntPtr)index];
+ GCHandle gch = map.m_objects[index];
if (!IsEmpty(gch))
{
IRenderHandleOwner target = (IRenderHandleOwner)gch.Target;
if (target != null)
- this.m_arObjects[(IntPtr)num++] = target;
+ this.m_arObjects[num++] = target;
}
}
}
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/LocalChannel.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/LocalChannel.cs
index 1941d0d..f73c96d 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/LocalChannel.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/LocalChannel.cs
@@ -25,10 +25,11 @@ namespace Microsoft.Iris.Render.Protocol
MessageCookieLayout layout)
{
Debug2.Validate(remoteContextId != ContextID.NULL, typeof(ArgumentNullException), nameof(remoteContextId));
- EngineApi.IFC(EngineApi.SpRenderThreadInit(ref new EngineApi.InitArgs(layout, remoteContextId)
+ var args = new EngineApi.InitArgs(layout, remoteContextId)
{
idObjectBrokerClass = brokerClassHandle
- }, out this.m_renderThread));
+ };
+ EngineApi.IFC(EngineApi.SpRenderThreadInit(ref args, out this.m_renderThread));
}
protected override void Dispose(bool inDispose)
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/Memory.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/Memory.cs
index 3a2d4d8..31686ae 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/Memory.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/Memory.cs
@@ -71,10 +71,10 @@ namespace Microsoft.Iris.Render.Protocol
break;
ushort* numPtr1 = (ushort*)pointer1;
ushort* numPtr2 = (ushort*)pointer1;
- ushort* numPtr3 = (ushort*)((IntPtr)numPtr2 + new IntPtr(2));
+ ushort* numPtr3 = (ushort*)(numPtr2 + 2);
ushort num3 = *numPtr2;
ushort* numPtr4 = numPtr1;
- ushort* numPtr5 = (ushort*)((IntPtr)numPtr4 + new IntPtr(2));
+ ushort* numPtr5 = (ushort*)(numPtr4 + 2);
int num4 = (ushort)((num3 & 65280) >> 8 | (num3 & byte.MaxValue) << 8);
*numPtr4 = (ushort)num4;
break;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/MessagingSession.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/MessagingSession.cs
index e74bbc3..222032c 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/MessagingSession.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/MessagingSession.cs
@@ -39,7 +39,7 @@ namespace Microsoft.Iris.Render.Protocol
{
}
- internal MessagingSession(
+ internal unsafe MessagingSession(
IRenderHost renderHost,
RenderToken token,
TimeoutHandler handlerTimeout,
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/RemoteObject.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/RemoteObject.cs
index ede898f..cfebfce 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/RemoteObject.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/RemoteObject.cs
@@ -13,7 +13,7 @@ namespace Microsoft.Iris.Render.Protocol
{
private bool m_fFreeOnDispose;
protected RenderPort m_renderPort;
- protected RENDERHANDLE m_renderHandle;
+ internal RENDERHANDLE m_renderHandle;
public RemoteObject(RenderPort port, IRenderHandleOwner owner)
{
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/RenderPort.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/RenderPort.cs
index 6982e8b..cde9e69 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/RenderPort.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/RenderPort.cs
@@ -215,28 +215,30 @@ namespace Microsoft.Iris.Render.Protocol
{
Debug2.Validate(idRemoteBuffer != RENDERHANDLE.NULL, typeof(ArgumentNullException), nameof(idRemoteBuffer));
this.UpdateTraffic(0U, cbSize);
- EngineApi.IFC(EngineApi.SpBufferOpen(&new EngineApi.BufferInfo()
+ var info = new EngineApi.BufferInfo
{
idContextSrc = this._session.LocalContext,
idContextDest = this._idRemoteContext,
idBuffer = idRemoteBuffer,
nFlags = 0,
cbSizeBuffer = cbSize
- }, pvData));
+ };
+ EngineApi.IFC(EngineApi.SpBufferOpen(&info, pvData));
}
public unsafe void SendBatchBuffer(void* pvData, uint cbSize, RENDERHANDLE idRemoteBuffer)
{
int num = idRemoteBuffer != RENDERHANDLE.NULL ? 1 : 0;
this.UpdateTraffic(cbSize, 0U);
- EngineApi.IFC(EngineApi.SpBufferOpen(&new EngineApi.BufferInfo()
+ var info = new EngineApi.BufferInfo()
{
idContextSrc = this._session.LocalContext,
idContextDest = this._idRemoteContext,
idBuffer = idRemoteBuffer,
nFlags = EngineApi.BufferFlags.IsBatch,
cbSizeBuffer = cbSize
- }, pvData));
+ };
+ EngineApi.IFC(EngineApi.SpBufferOpen(&info, pvData));
}
public unsafe void SendMessageBuffer(Message* pmsg)
@@ -245,14 +247,15 @@ namespace Microsoft.Iris.Render.Protocol
uint src = pmsg->cbSize;
if (this.ForeignByteOrder)
src = Memory.ConvertEndian(src);
- EngineApi.IFC(EngineApi.SpBufferOpen(&new EngineApi.BufferInfo()
+ var info = new EngineApi.BufferInfo()
{
idContextSrc = this._session.LocalContext,
idContextDest = this._idRemoteContext,
idBuffer = RENDERHANDLE.NULL,
nFlags = EngineApi.BufferFlags.CopyData,
cbSizeBuffer = src
- }, pmsg));
+ };
+ EngineApi.IFC(EngineApi.SpBufferOpen(&info, pmsg));
}
private void UpdateTraffic(uint uControl, uint uData)
@@ -571,7 +574,7 @@ namespace Microsoft.Iris.Render.Protocol
private void DeferredHeapReleaseWorker(object args) => this._spareHeapCache.Push((MessageHeap)args);
- private object HeapCacheCallback(ObjectCache.Operation operation, object data)
+ private unsafe object HeapCacheCallback(ObjectCache.Operation operation, object data)
{
this.Session.AssertOwningThread();
MessageHeap key = data as MessageHeap;
@@ -660,12 +663,12 @@ namespace Microsoft.Iris.Render.Protocol
uint num2 = 2U * num1;
if (num2 == 0U)
num2 = 16U;
- RENDERHANDLE[] renderhandleArray = new RENDERHANDLE[(IntPtr)num2];
+ RENDERHANDLE[] renderhandleArray = new RENDERHANDLE[num2];
if (num1 > 0U)
Array.Copy(_pendingBatchDeletes, renderhandleArray, this._pendingBatchDeletes.Length);
this._pendingBatchDeletes = renderhandleArray;
}
- this._pendingBatchDeletes[(IntPtr)this._pendingBatchDeleteSlot] = handle;
+ this._pendingBatchDeletes[this._pendingBatchDeleteSlot] = handle;
++this._pendingBatchDeleteSlot;
}
@@ -690,12 +693,12 @@ namespace Microsoft.Iris.Render.Protocol
uint num2 = 2U * num1;
if (num2 == 0U)
num2 = 16U;
- RENDERGROUP[] rendergroupArray = new RENDERGROUP[(IntPtr)num2];
+ RENDERGROUP[] rendergroupArray = new RENDERGROUP[num2];
if (num1 > 0U)
Array.Copy(_pendingBatchGroupDeletes, rendergroupArray, this._pendingBatchGroupDeletes.Length);
this._pendingBatchGroupDeletes = rendergroupArray;
}
- this._pendingBatchGroupDeletes[(IntPtr)this._pendingBatchGroupDeleteSlot] = group;
+ this._pendingBatchGroupDeletes[this._pendingBatchGroupDeleteSlot] = group;
++this._pendingBatchGroupDeleteSlot;
}
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/LocalFormWindowCallback.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/LocalFormWindowCallback.cs
index 945c58b..f26eb81 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/LocalFormWindowCallback.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/LocalFormWindowCallback.cs
@@ -46,7 +46,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Desktop
public override int GetHashCode() => base.GetHashCode();
- internal static RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
+ internal static unsafe RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
private static unsafe void DispatchCallback(
RenderPort port,
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/LocalInputCallback.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/LocalInputCallback.cs
index 39f715d..2d66af2 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/LocalInputCallback.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/LocalInputCallback.cs
@@ -34,7 +34,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Desktop
public override int GetHashCode() => base.GetHashCode();
- internal static RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
+ internal static unsafe RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
private static unsafe void DispatchCallback(
RenderPort port,
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/LocalDesktopManagerCallback.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/LocalDesktopManagerCallback.cs
index 7db7107..fbb2a2f 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/LocalDesktopManagerCallback.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/LocalDesktopManagerCallback.cs
@@ -40,7 +40,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Desktop.Nt
public override int GetHashCode() => base.GetHashCode();
- internal static RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
+ internal static unsafe RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
private static unsafe void DispatchCallback(
RenderPort port,
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/LocalHwndHostWindowCallback.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/LocalHwndHostWindowCallback.cs
index 98aea14..1dfa046 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/LocalHwndHostWindowCallback.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/LocalHwndHostWindowCallback.cs
@@ -32,7 +32,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Desktop.Nt
public override int GetHashCode() => base.GetHashCode();
- internal static RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
+ internal static unsafe RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
private static unsafe void DispatchCallback(
RenderPort port,
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/RemoteDesktopManager.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/RemoteDesktopManager.cs
index 6e6e6e2..0a884e8 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/RemoteDesktopManager.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/RemoteDesktopManager.cs
@@ -32,7 +32,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Desktop.Nt
RemoteDesktopManager remoteDesktopManager = new RemoteDesktopManager(port, _priv_owner);
uint num = (uint)sizeof(RemoteDesktopManager.Msg2_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteDesktopManager.Msg2_Create* msg2CreatePtr = (RemoteDesktopManager.Msg2_Create*)pMem;
msg2CreatePtr->_priv_size = num;
msg2CreatePtr->_priv_msgid = 2U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/RemoteFormWindow.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/RemoteFormWindow.cs
index dca1fbf..6792548 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/RemoteFormWindow.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/RemoteFormWindow.cs
@@ -28,7 +28,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Desktop.Nt
RemoteFormWindow remoteFormWindow = new RemoteFormWindow(port, _priv_owner);
uint num = (uint)sizeof(RemoteFormWindow.Msg41_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteFormWindow.Msg41_Create* msg41CreatePtr = (RemoteFormWindow.Msg41_Create*)pMem;
msg41CreatePtr->_priv_size = num;
msg41CreatePtr->_priv_msgid = 41U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/RemoteHwndHostWindow.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/RemoteHwndHostWindow.cs
index d285ee6..effd155 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/RemoteHwndHostWindow.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Nt/RemoteHwndHostWindow.cs
@@ -33,7 +33,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Desktop.Nt
RemoteHwndHostWindow remoteHwndHostWindow = new RemoteHwndHostWindow(port, _priv_owner);
uint num = (uint)sizeof(RemoteHwndHostWindow.Msg4_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteHwndHostWindow.Msg4_Create* msg4CreatePtr = (RemoteHwndHostWindow.Msg4_Create*)pMem;
msg4CreatePtr->_priv_size = num;
msg4CreatePtr->_priv_msgid = 4U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/RemoteInputRouter.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/RemoteInputRouter.cs
index b294b22..7d79cf6 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/RemoteInputRouter.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/RemoteInputRouter.cs
@@ -30,7 +30,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Desktop
RemoteInputRouter remoteInputRouter = new RemoteInputRouter(port, _priv_owner);
uint num = (uint)sizeof(RemoteInputRouter.Msg2_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteInputRouter.Msg2_Create* msg2CreatePtr = (RemoteInputRouter.Msg2_Create*)pMem;
msg2CreatePtr->_priv_size = num;
msg2CreatePtr->_priv_msgid = 2U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Xenon/RemoteFormWindow.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Xenon/RemoteFormWindow.cs
index 7840dd8..57d57fa 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Xenon/RemoteFormWindow.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Desktop/Xenon/RemoteFormWindow.cs
@@ -27,7 +27,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Desktop.Xenon
RemoteFormWindow remoteFormWindow = new RemoteFormWindow(port, _priv_owner);
uint num = (uint)sizeof(RemoteFormWindow.Msg41_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteFormWindow.Msg41_Create* msg41CreatePtr = (RemoteFormWindow.Msg41_Create*)pMem;
msg41CreatePtr->_priv_size = num;
msg41CreatePtr->_priv_msgid = 41U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Messaging/LocalDataBufferCallback.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Messaging/LocalDataBufferCallback.cs
index 67380fe..fbcdd9e 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Messaging/LocalDataBufferCallback.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Messaging/LocalDataBufferCallback.cs
@@ -34,7 +34,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Messaging
public override int GetHashCode() => base.GetHashCode();
- internal static RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
+ internal static unsafe RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
private static unsafe void DispatchCallback(
RenderPort port,
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Messaging/LocalRenderPortCallback.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Messaging/LocalRenderPortCallback.cs
index 748c099..3e5bf1a 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Messaging/LocalRenderPortCallback.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Messaging/LocalRenderPortCallback.cs
@@ -28,7 +28,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Messaging
RENDERHANDLE callbackInstance = _priv_protocolInstance.RenderPortCallback_CallbackInstance;
uint num = (uint)sizeof(LocalRenderPortCallback.Msg0_OnBatchProcessed);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
LocalRenderPortCallback.Msg0_OnBatchProcessed* onBatchProcessedPtr = (LocalRenderPortCallback.Msg0_OnBatchProcessed*)pMem;
onBatchProcessedPtr->_priv_size = num;
onBatchProcessedPtr->_priv_msgid = 0U;
@@ -48,7 +48,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Messaging
RENDERHANDLE callbackInstance = _priv_protocolInstance.RenderPortCallback_CallbackInstance;
uint num = (uint)sizeof(LocalRenderPortCallback.Msg1_OnPingReply);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
LocalRenderPortCallback.Msg1_OnPingReply* msg1OnPingReplyPtr = (LocalRenderPortCallback.Msg1_OnPingReply*)pMem;
msg1OnPingReplyPtr->_priv_size = num;
msg1OnPingReplyPtr->_priv_msgid = 1U;
@@ -75,7 +75,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Messaging
public override int GetHashCode() => base.GetHashCode();
- internal static RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
+ internal static unsafe RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
private static unsafe void DispatchCallback(
RenderPort port,
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Messaging/RemoteContextRelay.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Messaging/RemoteContextRelay.cs
index ad300eb..84ec013 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Messaging/RemoteContextRelay.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Messaging/RemoteContextRelay.cs
@@ -34,7 +34,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Messaging
BLOBREF blobref2 = blobInfo.Add(stSession);
uint adjustedTotalSize = blobInfo.AdjustedTotalSize;
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)adjustedTotalSize);
+ byte* pMem = stackalloc byte[(int)adjustedTotalSize];
RemoteContextRelay.Msg2_Create* msg2CreatePtr = (RemoteContextRelay.Msg2_Create*)pMem;
msg2CreatePtr->_priv_size = adjustedTotalSize;
msg2CreatePtr->_priv_msgid = 2U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalAnimationCallback.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalAnimationCallback.cs
index 09d5bb9..40bec9d 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalAnimationCallback.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalAnimationCallback.cs
@@ -34,7 +34,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
public override int GetHashCode() => base.GetHashCode();
- internal static RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
+ internal static unsafe RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
private static unsafe void DispatchCallback(
RenderPort port,
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalDeviceCallback.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalDeviceCallback.cs
index b292fbd..9f35dc6 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalDeviceCallback.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalDeviceCallback.cs
@@ -39,7 +39,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
public override int GetHashCode() => base.GetHashCode();
- internal static RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
+ internal static unsafe RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
private static unsafe void DispatchCallback(
RenderPort port,
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalRenderCapsCallback.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalRenderCapsCallback.cs
index 2feeda0..27cd8c4 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalRenderCapsCallback.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalRenderCapsCallback.cs
@@ -38,7 +38,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
public override int GetHashCode() => base.GetHashCode();
- internal static RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
+ internal static unsafe RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
private static unsafe void DispatchCallback(
RenderPort port,
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalSoundBufferCallback.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalSoundBufferCallback.cs
index 2dd681e..bbf018c 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalSoundBufferCallback.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalSoundBufferCallback.cs
@@ -35,7 +35,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
public override int GetHashCode() => base.GetHashCode();
- internal static RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
+ internal static unsafe RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
private static unsafe void DispatchCallback(
RenderPort port,
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalVideoPoolCallback.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalVideoPoolCallback.cs
index 5269d1d..cdf4dac 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalVideoPoolCallback.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/LocalVideoPoolCallback.cs
@@ -35,14 +35,14 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
public override int GetHashCode() => base.GetHashCode();
- internal static RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
+ internal static unsafe RENDERHANDLE BindCallback(RenderPort port) => port.RegisterCallback(new PortCallback(DispatchCallback), out uint _);
private static unsafe void DispatchCallback(
RenderPort port,
IRenderHandleOwner owner,
CallbackMessage* message)
{
- if (!(owner is IVideoPoolCallback _priv_target))
+ if (owner is not IVideoPoolCallback _priv_target)
return;
switch (message->nMsg)
{
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteDs8SoundDevice.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteDs8SoundDevice.cs
index 9fae3b7..e460ad4 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteDs8SoundDevice.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteDs8SoundDevice.cs
@@ -25,7 +25,8 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering.Nt
RemoteDs8SoundDevice remoteDs8SoundDevice = new RemoteDs8SoundDevice(port, _priv_owner);
uint num = (uint)sizeof(RemoteDs8SoundDevice.Msg4_Create);
// ISSUE: untyped stack allocation
- RemoteDs8SoundDevice.Msg4_Create* msg4CreatePtr = (RemoteDs8SoundDevice.Msg4_Create*)__untypedstackalloc(1 * (int)num);
+ byte* bytes = stackalloc byte[(int)num];
+ RemoteDs8SoundDevice.Msg4_Create* msg4CreatePtr = (Msg4_Create*)bytes;
msg4CreatePtr->_priv_size = num;
msg4CreatePtr->_priv_msgid = 4U;
msg4CreatePtr->hwnd = hwnd;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteGdiDevice.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteGdiDevice.cs
index a25fc4f..00377da 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteGdiDevice.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteGdiDevice.cs
@@ -37,7 +37,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering.Nt
RemoteGdiDevice remoteGdiDevice = new RemoteGdiDevice(port, _priv_owner);
uint num = (uint)sizeof(RemoteGdiDevice.Msg23_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteGdiDevice.Msg23_Create* msg23CreatePtr = (RemoteGdiDevice.Msg23_Create*)pMem;
msg23CreatePtr->_priv_size = num;
msg23CreatePtr->_priv_msgid = 23U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteGdiSprite.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteGdiSprite.cs
index 7d87358..dcc9085 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteGdiSprite.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteGdiSprite.cs
@@ -26,7 +26,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering.Nt
RemoteGdiSprite remoteGdiSprite = new RemoteGdiSprite(port, _priv_owner);
uint num = (uint)sizeof(RemoteGdiSprite.Msg22_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteGdiSprite.Msg22_Create* msg22CreatePtr = (RemoteGdiSprite.Msg22_Create*)pMem;
msg22CreatePtr->_priv_size = num;
msg22CreatePtr->_priv_msgid = 22U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteNtDevice.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteNtDevice.cs
index 7dd3fff..e079909 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteNtDevice.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteNtDevice.cs
@@ -33,7 +33,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering.Nt
RemoteNtDevice remoteNtDevice = new RemoteNtDevice(port, _priv_owner);
uint num = (uint)sizeof(RemoteNtDevice.Msg19_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteNtDevice.Msg19_Create* msg19CreatePtr = (RemoteNtDevice.Msg19_Create*)pMem;
msg19CreatePtr->_priv_size = num;
msg19CreatePtr->_priv_msgid = 19U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteWinSoundDevice.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteWinSoundDevice.cs
index 799089e..7dfdac0 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteWinSoundDevice.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Nt/RemoteWinSoundDevice.cs
@@ -26,7 +26,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering.Nt
RemoteWinSoundDevice remoteWinSoundDevice = new RemoteWinSoundDevice(port, _priv_owner);
uint num = (uint)sizeof(RemoteWinSoundDevice.Msg4_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteWinSoundDevice.Msg4_Create* msg4CreatePtr = (RemoteWinSoundDevice.Msg4_Create*)pMem;
msg4CreatePtr->_priv_size = num;
msg4CreatePtr->_priv_msgid = 4U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteAnimation.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteAnimation.cs
index 51fd8f2..cb44409 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteAnimation.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteAnimation.cs
@@ -67,7 +67,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
RemoteAnimation remoteAnimation = new RemoteAnimation(port, _priv_owner);
uint num = (uint)sizeof(RemoteAnimation.Msg43_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteAnimation.Msg43_Create* msg43CreatePtr = (RemoteAnimation.Msg43_Create*)pMem;
msg43CreatePtr->_priv_size = num;
msg43CreatePtr->_priv_msgid = 43U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteAnimationInputProvider.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteAnimationInputProvider.cs
index c39958e..84e3d23 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteAnimationInputProvider.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteAnimationInputProvider.cs
@@ -38,7 +38,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
RemoteAnimationInputProvider animationInputProvider = new RemoteAnimationInputProvider(port, _priv_owner);
uint num = (uint)sizeof(RemoteAnimationInputProvider.Msg10_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteAnimationInputProvider.Msg10_Create* msg10CreatePtr = (RemoteAnimationInputProvider.Msg10_Create*)pMem;
msg10CreatePtr->_priv_size = num;
msg10CreatePtr->_priv_msgid = 10U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteAnimationManager.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteAnimationManager.cs
index 7f66f2b..cc3a916 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteAnimationManager.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteAnimationManager.cs
@@ -30,7 +30,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
RemoteAnimationManager animationManager = new RemoteAnimationManager(port, _priv_owner);
uint num = (uint)sizeof(RemoteAnimationManager.Msg3_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteAnimationManager.Msg3_Create* msg3CreatePtr = (RemoteAnimationManager.Msg3_Create*)pMem;
msg3CreatePtr->_priv_size = num;
msg3CreatePtr->_priv_msgid = 3U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteCamera.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteCamera.cs
index c3efe77..716229b 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteCamera.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteCamera.cs
@@ -32,7 +32,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
RemoteCamera remoteCamera = new RemoteCamera(port, _priv_owner);
uint num = (uint)sizeof(RemoteCamera.Msg5_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteCamera.Msg5_Create* msg5CreatePtr = (RemoteCamera.Msg5_Create*)pMem;
msg5CreatePtr->_priv_size = num;
msg5CreatePtr->_priv_msgid = 5U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteDx9EffectResource.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteDx9EffectResource.cs
index ee11d3e..251f752 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteDx9EffectResource.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteDx9EffectResource.cs
@@ -40,7 +40,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
RemoteDx9EffectResource dx9EffectResource = new RemoteDx9EffectResource(port, _priv_owner);
uint num = (uint)sizeof(RemoteDx9EffectResource.Msg10_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteDx9EffectResource.Msg10_Create* msg10CreatePtr = (RemoteDx9EffectResource.Msg10_Create*)pMem;
msg10CreatePtr->_priv_size = num;
msg10CreatePtr->_priv_msgid = 10U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteDx9Sprite.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteDx9Sprite.cs
index 1307fe2..8b3424e 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteDx9Sprite.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteDx9Sprite.cs
@@ -26,7 +26,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
RemoteDx9Sprite remoteDx9Sprite = new RemoteDx9Sprite(port, _priv_owner);
uint num = (uint)sizeof(RemoteDx9Sprite.Msg22_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteDx9Sprite.Msg22_Create* msg22CreatePtr = (RemoteDx9Sprite.Msg22_Create*)pMem;
msg22CreatePtr->_priv_size = num;
msg22CreatePtr->_priv_msgid = 22U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteExternalAnimationInput.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteExternalAnimationInput.cs
index 8a6c829..7ca2963 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteExternalAnimationInput.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteExternalAnimationInput.cs
@@ -27,7 +27,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
RemoteExternalAnimationInput externalAnimationInput = new RemoteExternalAnimationInput(port, _priv_owner);
uint num = (uint)sizeof(RemoteExternalAnimationInput.Msg0_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteExternalAnimationInput.Msg0_Create* msg0CreatePtr = (RemoteExternalAnimationInput.Msg0_Create*)pMem;
msg0CreatePtr->_priv_size = num;
msg0CreatePtr->_priv_msgid = 0U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteNullDevice.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteNullDevice.cs
index e2b1d62..ef26d67 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteNullDevice.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteNullDevice.cs
@@ -27,7 +27,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
RemoteNullDevice remoteNullDevice = new RemoteNullDevice(port, _priv_owner);
uint num = (uint)sizeof(RemoteNullDevice.Msg8_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteNullDevice.Msg8_Create* msg8CreatePtr = (RemoteNullDevice.Msg8_Create*)pMem;
msg8CreatePtr->_priv_size = num;
msg8CreatePtr->_priv_msgid = 8U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteRenderCaps.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteRenderCaps.cs
index 30dcb00..6f49cf1 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteRenderCaps.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteRenderCaps.cs
@@ -29,7 +29,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
RemoteRenderCaps remoteRenderCaps = new RemoteRenderCaps(port, _priv_owner);
uint num = (uint)sizeof(RemoteRenderCaps.Msg1_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteRenderCaps.Msg1_Create* msg1CreatePtr = (RemoteRenderCaps.Msg1_Create*)pMem;
msg1CreatePtr->_priv_size = num;
msg1CreatePtr->_priv_msgid = 1U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteVisualContainer.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteVisualContainer.cs
index 85e078e..8a4a638 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteVisualContainer.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteVisualContainer.cs
@@ -28,7 +28,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
RemoteVisualContainer remoteVisualContainer = new RemoteVisualContainer(port, _priv_owner);
uint num = (uint)sizeof(RemoteVisualContainer.Msg19_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteVisualContainer.Msg19_Create* msg19CreatePtr = (RemoteVisualContainer.Msg19_Create*)pMem;
msg19CreatePtr->_priv_size = num;
msg19CreatePtr->_priv_msgid = 19U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteWaitCursor.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteWaitCursor.cs
index a1c5fa1..c73ab0a 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteWaitCursor.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/RemoteWaitCursor.cs
@@ -32,7 +32,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
RemoteWaitCursor remoteWaitCursor = new RemoteWaitCursor(port, _priv_owner);
uint num = (uint)sizeof(RemoteWaitCursor.Msg5_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteWaitCursor.Msg5_Create* msg5CreatePtr = (RemoteWaitCursor.Msg5_Create*)pMem;
msg5CreatePtr->_priv_size = num;
msg5CreatePtr->_priv_msgid = 5U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Xenon/RemoteXAudSoundDevice.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Xenon/RemoteXAudSoundDevice.cs
index 69e9b50..fc6e19e 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Xenon/RemoteXAudSoundDevice.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Xenon/RemoteXAudSoundDevice.cs
@@ -29,7 +29,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering.Xenon
RemoteXAudSoundDevice remoteXaudSoundDevice = new RemoteXAudSoundDevice(port, _priv_owner);
uint num = (uint)sizeof(RemoteXAudSoundDevice.Msg6_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteXAudSoundDevice.Msg6_Create* msg6CreatePtr = (RemoteXAudSoundDevice.Msg6_Create*)pMem;
msg6CreatePtr->_priv_size = num;
msg6CreatePtr->_priv_msgid = 6U;
diff --git a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Xenon/RemoteXeDevice.cs b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Xenon/RemoteXeDevice.cs
index 1a375ce..9a8667b 100644
--- a/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Xenon/RemoteXeDevice.cs
+++ b/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocols/Splash/Rendering/Xenon/RemoteXeDevice.cs
@@ -28,7 +28,7 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering.Xenon
RemoteXeDevice remoteXeDevice = new RemoteXeDevice(port, _priv_owner);
uint num = (uint)sizeof(RemoteXeDevice.Msg11_Create);
// ISSUE: untyped stack allocation
- byte* pMem = (byte*)__untypedstackalloc(1 * (int)num);
+ byte* pMem = stackalloc byte[(int)num];
RemoteXeDevice.Msg11_Create* msg11CreatePtr = (RemoteXeDevice.Msg11_Create*)pMem;
msg11CreatePtr->_priv_size = num;
msg11CreatePtr->_priv_msgid = 11U;
diff --git a/UIX.RenderApi.Skia/UIX.RenderApi.Skia.csproj b/UIX.RenderApi.Skia/UIX.RenderApi.Skia.csproj
index 96e6258..41821c2 100644
--- a/UIX.RenderApi.Skia/UIX.RenderApi.Skia.csproj
+++ b/UIX.RenderApi.Skia/UIX.RenderApi.Skia.csproj
@@ -6,6 +6,7 @@
Library
UIX.RenderApi.Skia
false
+ 9
true