mirror of
https://github.com/ZuneDev/Xune.git
synced 2026-07-27 13:13:10 -07:00
Added instance of IrisEngineInfo to RenderObject
This commit is contained in:
@@ -12,6 +12,7 @@ namespace Microsoft.Iris.Render.Common
|
||||
internal abstract class RenderObject : IRenderObject, IDisposable
|
||||
{
|
||||
private bool m_fObjectDisposed;
|
||||
private IrisEngineInfo m_engineInfo;
|
||||
|
||||
internal RenderObject() => this.m_fObjectDisposed = false;
|
||||
|
||||
@@ -40,6 +41,8 @@ namespace Microsoft.Iris.Render.Common
|
||||
}
|
||||
}
|
||||
|
||||
internal IrisEngineInfo EngineInfo => m_engineInfo;
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
protected virtual void Invariant() => Debug2.Validate(!this.m_fObjectDisposed, typeof(ObjectDisposedException), this.GetType().ToString());
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace Microsoft.Iris.Render.Internal
|
||||
private static BitArray s_contexts;
|
||||
private static uint s_contextIdSeed = 1;
|
||||
private static uint s_maxContextId = 254;
|
||||
private IrisEngineInfo m_engineInfo;
|
||||
private RenderToken m_primaryToken;
|
||||
private MessagingSession m_messagingSession;
|
||||
private RenderSession m_renderSession;
|
||||
|
||||
+9
-9
@@ -49,14 +49,14 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
|
||||
Debug2.Throw(this.IsValid, "Non-static method call requires an instance");
|
||||
_priv_portUse = this.m_renderPort;
|
||||
_priv_portUse.ValidateHandle(this.m_renderHandle);
|
||||
uint size = (uint)sizeof(RemoteAnimationManager.Msg0_SetAnimationRate);
|
||||
RemoteAnimationManager.Msg0_SetAnimationRate* setAnimationRatePtr = (RemoteAnimationManager.Msg0_SetAnimationRate*)_priv_portUse.AllocMessageBuffer(size);
|
||||
uint size = (uint)sizeof(Msg0_SetAnimationRate);
|
||||
Msg0_SetAnimationRate* setAnimationRatePtr = (Msg0_SetAnimationRate*)_priv_portUse.AllocMessageBuffer(size);
|
||||
setAnimationRatePtr->_priv_size = size;
|
||||
setAnimationRatePtr->_priv_msgid = 0U;
|
||||
setAnimationRatePtr->nFramesPerSecond = nFramesPerSecond;
|
||||
setAnimationRatePtr->_priv_idObjectSubject = this.m_renderHandle;
|
||||
if (_priv_portUse.ForeignByteOrder)
|
||||
MarshalHelper.SwapByteOrder((byte*)setAnimationRatePtr, ref s_priv_ByteOrder_Msg0_SetAnimationRate, typeof(RemoteAnimationManager.Msg0_SetAnimationRate), 0, 0);
|
||||
MarshalHelper.SwapByteOrder((byte*)setAnimationRatePtr, ref s_priv_ByteOrder_Msg0_SetAnimationRate, typeof(Msg0_SetAnimationRate), 0, 0);
|
||||
_priv_pmsgUse = (Message*)setAnimationRatePtr;
|
||||
}
|
||||
|
||||
@@ -76,14 +76,14 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
|
||||
Debug2.Throw(this.IsValid, "Non-static method call requires an instance");
|
||||
_priv_portUse = this.m_renderPort;
|
||||
_priv_portUse.ValidateHandle(this.m_renderHandle);
|
||||
uint size = (uint)sizeof(RemoteAnimationManager.Msg1_PulseTimeAdvance);
|
||||
RemoteAnimationManager.Msg1_PulseTimeAdvance* pulseTimeAdvancePtr = (RemoteAnimationManager.Msg1_PulseTimeAdvance*)_priv_portUse.AllocMessageBuffer(size);
|
||||
uint size = (uint)sizeof(Msg1_PulseTimeAdvance);
|
||||
Msg1_PulseTimeAdvance* pulseTimeAdvancePtr = (Msg1_PulseTimeAdvance*)_priv_portUse.AllocMessageBuffer(size);
|
||||
pulseTimeAdvancePtr->_priv_size = size;
|
||||
pulseTimeAdvancePtr->_priv_msgid = 1U;
|
||||
pulseTimeAdvancePtr->nPulseMs = nPulseMs;
|
||||
pulseTimeAdvancePtr->_priv_idObjectSubject = this.m_renderHandle;
|
||||
if (_priv_portUse.ForeignByteOrder)
|
||||
MarshalHelper.SwapByteOrder((byte*)pulseTimeAdvancePtr, ref s_priv_ByteOrder_Msg1_PulseTimeAdvance, typeof(RemoteAnimationManager.Msg1_PulseTimeAdvance), 0, 0);
|
||||
MarshalHelper.SwapByteOrder((byte*)pulseTimeAdvancePtr, ref s_priv_ByteOrder_Msg1_PulseTimeAdvance, typeof(Msg1_PulseTimeAdvance), 0, 0);
|
||||
_priv_pmsgUse = (Message*)pulseTimeAdvancePtr;
|
||||
}
|
||||
|
||||
@@ -103,14 +103,14 @@ namespace Microsoft.Iris.Render.Protocols.Splash.Rendering
|
||||
Debug2.Throw(this.IsValid, "Non-static method call requires an instance");
|
||||
_priv_portUse = this.m_renderPort;
|
||||
_priv_portUse.ValidateHandle(this.m_renderHandle);
|
||||
uint size = (uint)sizeof(RemoteAnimationManager.Msg2_SetGlobalSpeedAdjustment);
|
||||
RemoteAnimationManager.Msg2_SetGlobalSpeedAdjustment* globalSpeedAdjustmentPtr = (RemoteAnimationManager.Msg2_SetGlobalSpeedAdjustment*)_priv_portUse.AllocMessageBuffer(size);
|
||||
uint size = (uint)sizeof(Msg2_SetGlobalSpeedAdjustment);
|
||||
Msg2_SetGlobalSpeedAdjustment* globalSpeedAdjustmentPtr = (Msg2_SetGlobalSpeedAdjustment*)_priv_portUse.AllocMessageBuffer(size);
|
||||
globalSpeedAdjustmentPtr->_priv_size = size;
|
||||
globalSpeedAdjustmentPtr->_priv_msgid = 2U;
|
||||
globalSpeedAdjustmentPtr->flFactor = flFactor;
|
||||
globalSpeedAdjustmentPtr->_priv_idObjectSubject = this.m_renderHandle;
|
||||
if (_priv_portUse.ForeignByteOrder)
|
||||
MarshalHelper.SwapByteOrder((byte*)globalSpeedAdjustmentPtr, ref s_priv_ByteOrder_Msg2_SetGlobalSpeedAdjustment, typeof(RemoteAnimationManager.Msg2_SetGlobalSpeedAdjustment), 0, 0);
|
||||
MarshalHelper.SwapByteOrder((byte*)globalSpeedAdjustmentPtr, ref s_priv_ByteOrder_Msg2_SetGlobalSpeedAdjustment, typeof(Msg2_SetGlobalSpeedAdjustment), 0, 0);
|
||||
_priv_pmsgUse = (Message*)globalSpeedAdjustmentPtr;
|
||||
}
|
||||
|
||||
|
||||
@@ -302,14 +302,14 @@ namespace Microsoft.Iris.Session
|
||||
|
||||
internal void FireOnUnhandledException(object sender, Exception e)
|
||||
{
|
||||
UISession.UnhandledExceptionHandler unhandledException = OnUnhandledException;
|
||||
UnhandledExceptionHandler unhandledException = OnUnhandledException;
|
||||
if (unhandledException == null)
|
||||
return;
|
||||
UISession.UnhandledExceptionArgs args = new UISession.UnhandledExceptionArgs(e);
|
||||
UnhandledExceptionArgs args = new UnhandledExceptionArgs(e);
|
||||
unhandledException(sender, args);
|
||||
}
|
||||
|
||||
public event UISession.UnhandledExceptionHandler OnUnhandledException;
|
||||
public event UnhandledExceptionHandler OnUnhandledException;
|
||||
|
||||
public Form Form => _form;
|
||||
|
||||
@@ -319,7 +319,7 @@ namespace Microsoft.Iris.Session
|
||||
|
||||
public void PlaySound(string stSoundSource)
|
||||
{
|
||||
UISession.PlaySoundArgs playSoundArgs = new UISession.PlaySoundArgs(this, stSoundSource);
|
||||
PlaySoundArgs playSoundArgs = new PlaySoundArgs(this, stSoundSource);
|
||||
if (!UIDispatcher.IsUIThread)
|
||||
DeferredCall.Post(DispatchPriority.High, s_deferredPlaySound, playSoundArgs);
|
||||
else
|
||||
@@ -328,7 +328,7 @@ namespace Microsoft.Iris.Session
|
||||
|
||||
private static void DeferredPlaySound(object argsObject)
|
||||
{
|
||||
UISession.PlaySoundArgs playSoundArgs = argsObject as UISession.PlaySoundArgs;
|
||||
PlaySoundArgs playSoundArgs = argsObject as PlaySoundArgs;
|
||||
if (!playSoundArgs.uiSession.IsValid || playSoundArgs.stSoundSource == null)
|
||||
return;
|
||||
new Sound() { Source = playSoundArgs.stSoundSource }.Play();
|
||||
@@ -336,7 +336,7 @@ namespace Microsoft.Iris.Session
|
||||
|
||||
public void PlaySystemSound(SystemSoundEvent systemSoundEvent)
|
||||
{
|
||||
UISession.PlaySystemSoundArgs playSystemSoundArgs = new UISession.PlaySystemSoundArgs(this, systemSoundEvent);
|
||||
PlaySystemSoundArgs playSystemSoundArgs = new PlaySystemSoundArgs(this, systemSoundEvent);
|
||||
if (!UIDispatcher.IsUIThread)
|
||||
DeferredCall.Post(DispatchPriority.High, s_deferredPlaySystemSound, playSystemSoundArgs);
|
||||
else
|
||||
@@ -345,7 +345,7 @@ namespace Microsoft.Iris.Session
|
||||
|
||||
private static void DeferredPlaySystemSound(object argsObject)
|
||||
{
|
||||
UISession.PlaySystemSoundArgs playSystemSoundArgs = argsObject as UISession.PlaySystemSoundArgs;
|
||||
PlaySystemSoundArgs playSystemSoundArgs = argsObject as PlaySystemSoundArgs;
|
||||
if (!playSystemSoundArgs.uiSession.IsValid || playSystemSoundArgs.systemSoundEvent == SystemSoundEvent.None)
|
||||
return;
|
||||
new Sound()
|
||||
@@ -367,12 +367,12 @@ namespace Microsoft.Iris.Session
|
||||
|
||||
public delegate void UnhandledExceptionHandler(
|
||||
object sender,
|
||||
UISession.UnhandledExceptionArgs args);
|
||||
UnhandledExceptionArgs args);
|
||||
|
||||
private class TaskReentrancyDetection : IDisposable
|
||||
{
|
||||
private static string s_currentTask;
|
||||
private static UISession.TaskReentrancyDetection s_currentTaskClearer = new UISession.TaskReentrancyDetection();
|
||||
private static TaskReentrancyDetection s_currentTaskClearer = new TaskReentrancyDetection();
|
||||
|
||||
public static IDisposable Enter(string task)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user