Skip to main content

Class GRContext

Namespace: SkiaSharp
Assembly: VelloSharp.Skia.Core.dll

public sealed class GRContext : IDisposable

Inheritance​

object ← GRContext

Implements​

IDisposable

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​

GRBackend

Handle​

public nint Handle { get; }

Property Value​

nint

IsAbandoned​

public bool IsAbandoned { get; }

Property Value​

bool

Methods​

AbandonContext(bool)​

public void AbandonContext(bool releaseResources = false)

Parameters​

releaseResources bool

CreateDirect3D(GRD3DBackendContext)​

public static GRContext CreateDirect3D(GRD3DBackendContext backendContext)

Parameters​

backendContext GRD3DBackendContext

Returns​

GRContext

CreateDirect3D(GRD3DBackendContext, GRContextOptions?)​

public static GRContext CreateDirect3D(GRD3DBackendContext backendContext, GRContextOptions? options)

Parameters​

backendContext GRD3DBackendContext

options GRContextOptions?

Returns​

GRContext

CreateGl()​

public static GRContext CreateGl()

Returns​

GRContext

CreateGl(GRGlInterface?)​

public static GRContext CreateGl(GRGlInterface? backendContext)

Parameters​

backendContext GRGlInterface?

Returns​

GRContext

CreateGl(GRContextOptions?)​

public static GRContext CreateGl(GRContextOptions? options)

Parameters​

options GRContextOptions?

Returns​

GRContext

CreateGl(GRGlInterface?, GRContextOptions?)​

public static GRContext CreateGl(GRGlInterface? backendContext, GRContextOptions? options)

Parameters​

backendContext GRGlInterface?

options GRContextOptions?

Returns​

GRContext

CreateMetal(GRMtlBackendContext)​

public static GRContext CreateMetal(GRMtlBackendContext backendContext)

Parameters​

backendContext GRMtlBackendContext

Returns​

GRContext

CreateMetal(GRMtlBackendContext, GRContextOptions?)​

public static GRContext CreateMetal(GRMtlBackendContext backendContext, GRContextOptions? options)

Parameters​

backendContext GRMtlBackendContext

options GRContextOptions?

Returns​

GRContext

CreateVulkan(GRVkBackendContext)​

public static GRContext CreateVulkan(GRVkBackendContext backendContext)

Parameters​

backendContext GRVkBackendContext

Returns​

GRContext

CreateVulkan(GRVkBackendContext, GRContextOptions?)​

public static GRContext CreateVulkan(GRVkBackendContext backendContext, GRContextOptions? options)

Parameters​

backendContext GRVkBackendContext

options GRContextOptions?

Returns​

GRContext

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​

int

GetResourceCacheLimit()​

public long GetResourceCacheLimit()

Returns​

long

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