Class GRContext
Namespace: SkiaSharp
Assembly: VelloSharp.Skia.Core.dll
public sealed class GRContext : IDisposable
Inheritance
Implements
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Properties
Backend
public GRBackend Backend { get; }
Property Value
Handle
public nint Handle { get; }
Property Value
IsAbandoned
public bool IsAbandoned { get; }
Property Value
Methods
AbandonContext(bool)
public void AbandonContext(bool releaseResources = false)
Parameters
releaseResources bool
CreateDirect3D(GRD3DBackendContext)
public static GRContext CreateDirect3D(GRD3DBackendContext backendContext)
Parameters
backendContext GRD3DBackendContext
Returns
CreateDirect3D(GRD3DBackendContext, GRContextOptions?)
public static GRContext CreateDirect3D(GRD3DBackendContext backendContext, GRContextOptions? options)
Parameters
backendContext GRD3DBackendContext
options GRContextOptions?
Returns
CreateGl()
public static GRContext CreateGl()
Returns
CreateGl(GRGlInterface?)
public static GRContext CreateGl(GRGlInterface? backendContext)
Parameters
backendContext GRGlInterface?
Returns
CreateGl(GRContextOptions?)
public static GRContext CreateGl(GRContextOptions? options)
Parameters
options GRContextOptions?
Returns
CreateGl(GRGlInterface?, GRContextOptions?)
public static GRContext CreateGl(GRGlInterface? backendContext, GRContextOptions? options)
Parameters
backendContext GRGlInterface?
options GRContextOptions?
Returns
CreateMetal(GRMtlBackendContext)
public static GRContext CreateMetal(GRMtlBackendContext backendContext)
Parameters
backendContext GRMtlBackendContext
Returns
CreateMetal(GRMtlBackendContext, GRContextOptions?)
public static GRContext CreateMetal(GRMtlBackendContext backendContext, GRContextOptions? options)
Parameters
backendContext GRMtlBackendContext
options GRContextOptions?
Returns
CreateVulkan(GRVkBackendContext)
public static GRContext CreateVulkan(GRVkBackendContext backendContext)
Parameters
backendContext GRVkBackendContext
Returns
CreateVulkan(GRVkBackendContext, GRContextOptions?)
public static GRContext CreateVulkan(GRVkBackendContext backendContext, GRContextOptions? options)
Parameters
backendContext GRVkBackendContext
options GRContextOptions?
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
~GRContext()
protected ~GRContext()
Flush()
public void Flush()
Flush(bool, bool)
public void Flush(bool submit, bool synchronous = false)
Parameters
submit bool
synchronous bool
GetMaxSurfaceSampleCount(SKColorType)
public int GetMaxSurfaceSampleCount(SKColorType colorType)
Parameters
colorType SKColorType
Returns
GetResourceCacheLimit()
public long GetResourceCacheLimit()
Returns
GetResourceCacheUsage(out int, out long)
public void GetResourceCacheUsage(out int maxResources, out long maxResourceBytes)
Parameters
maxResources int
maxResourceBytes long
PurgeResources()
public void PurgeResources()
PurgeUnlockedResources(bool)
public void PurgeUnlockedResources(bool scratchResourcesOnly)
Parameters
scratchResourcesOnly bool
PurgeUnlockedResources(long, bool)
public void PurgeUnlockedResources(long bytesToPurge, bool preferScratchResources)
Parameters
bytesToPurge long
preferScratchResources bool
PurgeUnusedResources(long)
public void PurgeUnusedResources(long milliseconds)
Parameters
milliseconds long
ResetContext()
public void ResetContext()
ResetContext(GRBackendState)
public void ResetContext(GRBackendState state)
Parameters
state GRBackendState
ResetContext(GRGlBackendState)
public void ResetContext(GRGlBackendState state)
Parameters
state GRGlBackendState
ResetContext(uint)
public void ResetContext(uint state)
Parameters
state uint
SetResourceCacheLimit(long)
public void SetResourceCacheLimit(long maxResourceBytes)
Parameters
maxResourceBytes long
Submit(bool)
public void Submit(bool synchronous = false)
Parameters
synchronous bool