ExtensionsKt

Added in 1.0.0-alpha06

public final class ExtensionsKt


Summary

Public methods

static final @NonNull GPUColor
toGPUColor(int receiver)

Converts an Android color integer to a GPUColor.

static final @NonNull GPUColor
toGPUColor(long receiver)

Converts an Android color long to a GPUColor.

static final SyncFence

Converts to an Android platform SyncFence.

Public methods

toGPUColor

public static final @NonNull GPUColor toGPUColor(int receiver)

Converts an Android color integer to a GPUColor.

Returns
@NonNull GPUColor

The GPUColor representation of the integer color.

toGPUColor

public static final @NonNull GPUColor toGPUColor(long receiver)

Converts an Android color long to a GPUColor.

Returns
@NonNull GPUColor

The GPUColor representation of the long color.

toSyncFence

@ExperimentalWebGpuApi
public static final SyncFence toSyncFence(GPUSyncFence receiver)

Converts to an Android platform SyncFence.

Safely handles API level compatibility internally. On devices below Android T (API 33), this function will safely return null without requiring API version checks at the call site.