mirror of
https://github.com/ZuneDev/Xune.git
synced 2026-07-27 13:13:10 -07:00
Reimplemented basic RenderEngine for SK
This commit is contained in:
@@ -5,38 +5,43 @@
|
||||
// Assembly location: C:\Program Files\Zune\UIX.RenderApi.dll
|
||||
|
||||
using Microsoft.Iris.Render.Protocol;
|
||||
using SkiaSharp;
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Iris.Render
|
||||
{
|
||||
public sealed class IrisEngineInfo : EngineInfo
|
||||
{
|
||||
private SKSurface m_skSurface;
|
||||
private ConnectionInfo m_connectionInfo;
|
||||
|
||||
public static EngineInfo CreateLocal() => new IrisEngineInfo(true);
|
||||
public static EngineInfo CreateLocal(SKSurface skSurface) => new IrisEngineInfo(skSurface, true);
|
||||
|
||||
public static EngineInfo CreateRemote() => new IrisEngineInfo(true, TransportProtocol.TCP, "127.0.0.1", false);
|
||||
public static EngineInfo CreateRemote(SKSurface skSurface) => new IrisEngineInfo(skSurface, true, TransportProtocol.TCP, "127.0.0.1", false);
|
||||
|
||||
internal IrisEngineInfo(bool isPrimary)
|
||||
: base(EngineType.Iris)
|
||||
internal IrisEngineInfo(SKSurface skSurface, bool isPrimary) : base(EngineType.Iris)
|
||||
{
|
||||
if (!isPrimary)
|
||||
throw new NotImplementedException("Local connections to an existing engine are not supported yet");
|
||||
this.m_connectionInfo = new LocalConnectionInfo();
|
||||
this.m_skSurface = skSurface;
|
||||
}
|
||||
|
||||
internal IrisEngineInfo(
|
||||
bool isPrimary,
|
||||
TransportProtocol protocol,
|
||||
string sessionName,
|
||||
bool swapByteOrder)
|
||||
: base(EngineType.Iris)
|
||||
SKSurface skSurface,
|
||||
bool isPrimary,
|
||||
TransportProtocol protocol,
|
||||
string sessionName,
|
||||
bool swapByteOrder)
|
||||
: base(EngineType.Iris)
|
||||
{
|
||||
if (!isPrimary)
|
||||
throw new NotImplementedException("Local connections to an existing engine are not supported yet");
|
||||
this.m_connectionInfo = new RemoteConnectionInfo(protocol, sessionName, swapByteOrder);
|
||||
this.m_skSurface = skSurface;
|
||||
}
|
||||
|
||||
internal ConnectionInfo ConnectionInfo => this.m_connectionInfo;
|
||||
internal SKSurface Surface => this.m_skSurface;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user