Files
Xune/UIX.RenderApi.Skia/Microsoft/Iris/Render/IrisEngineInfo.cs
T

53 lines
2.2 KiB
C#
Raw Normal View History

2021-07-11 22:59:29 -05:00
// Decompiled with JetBrains decompiler
// Type: Microsoft.Iris.Render.IrisEngineInfo
// Assembly: UIX.RenderApi, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
// MVID: D47658B8-A8EA-43D6-8837-ECE823BFFFC1
// Assembly location: C:\Program Files\Zune\UIX.RenderApi.dll
using Microsoft.Iris.Render.Protocol;
2021-07-16 16:03:13 -05:00
using SkiaSharp;
2021-07-11 22:59:29 -05:00
using System;
namespace Microsoft.Iris.Render
{
2021-07-11 23:04:40 -05:00
public sealed class IrisEngineInfo : EngineInfo
2021-07-11 22:59:29 -05:00
{
private RenderWindowBase m_renderWindow;
2021-07-16 16:03:13 -05:00
private SKSurface m_skSurface;
2021-07-11 23:04:40 -05:00
private ConnectionInfo m_connectionInfo;
2021-07-11 22:59:29 -05:00
public static EngineInfo CreateLocal(SKSurface skSurface, RenderWindowBase renderWindow) => new IrisEngineInfo(skSurface, renderWindow, true);
2021-07-11 22:59:29 -05:00
public static EngineInfo CreateRemote(SKSurface skSurface, RenderWindowBase renderWindow) => new IrisEngineInfo(skSurface, renderWindow, true, TransportProtocol.TCP, "127.0.0.1", false);
2021-07-11 23:04:40 -05:00
internal IrisEngineInfo(SKSurface skSurface, RenderWindowBase renderWindow, bool isPrimary) : base(EngineType.Iris)
2021-07-11 23:04:40 -05:00
{
if (!isPrimary)
throw new NotImplementedException("Local connections to an existing engine are not supported yet");
2021-07-11 23:07:04 -05:00
this.m_connectionInfo = new LocalConnectionInfo();
this.m_renderWindow = renderWindow;
2021-07-16 16:03:13 -05:00
this.m_skSurface = skSurface;
2021-07-11 23:04:40 -05:00
}
internal IrisEngineInfo(
2021-07-16 16:03:13 -05:00
SKSurface skSurface,
RenderWindowBase renderWindow,
2021-07-16 16:03:13 -05:00
bool isPrimary,
TransportProtocol protocol,
string sessionName,
bool swapByteOrder)
: base(EngineType.Iris)
2021-07-11 23:04:40 -05:00
{
if (!isPrimary)
throw new NotImplementedException("Local connections to an existing engine are not supported yet");
2021-07-11 23:07:04 -05:00
this.m_connectionInfo = new RemoteConnectionInfo(protocol, sessionName, swapByteOrder);
this.m_renderWindow = renderWindow;
2021-07-16 16:03:13 -05:00
this.m_skSurface = skSurface;
2021-07-11 23:04:40 -05:00
}
internal ConnectionInfo ConnectionInfo => this.m_connectionInfo;
internal RenderWindowBase Window => this.m_renderWindow;
2021-07-16 16:03:13 -05:00
internal SKSurface Surface => this.m_skSurface;
2021-07-11 23:04:40 -05:00
}
2021-07-11 22:59:29 -05:00
}