SkiaLayer

actual open class SkiaLayer

Generic layer for Skiko rendering.

actual open class SkiaLayer

SkiaLayer implementation for macOS. Supports GraphicsApi.METAL and GraphicsApi.OPENGL.

actual open class SkiaLayer

Kotlin/Native Windows layer backed by a Win32 HWND.

Constructors

Link copied to clipboard
constructor(properties: SkiaLayerProperties = SkiaLayerProperties(), analytics: SkiaLayerAnalytics = SkiaLayerAnalytics.Empty)
constructor()
constructor(properties: SkiaLayerProperties = SkiaLayerProperties(), analytics: SkiaLayerAnalytics = SkiaLayerAnalytics.Empty, pixelGeometry: PixelGeometry = SkikoProperties.pixelGeometry)

Properties

Link copied to clipboard
actual val component: Any?

Underlying platform component.

actual val component: Any?

Underlying platform component.

actual val component: Any?

Underlying platform component.

Link copied to clipboard
actual val contentScale: Float

Current content scale.

actual val contentScale: Float

The scale factor of NSWindow https://developer.apple.com/documentation/appkit/nswindow/1419459-backingscalefactor

actual val contentScale: Float

Current content scale.

Link copied to clipboard

Current renderer and recovery counters for diagnostics and support tooling.

Current renderer and recovery counters for diagnostics and support tooling.

Link copied to clipboard
actual var fullscreen: Boolean

If rendering is full screen.

actual var fullscreen: Boolean

Fullscreen follows the attached Native host. An NSView-only attachment does not own its window.

actual var fullscreen: Boolean

If rendering is full screen.

Link copied to clipboard

True when needRender has requested a frame that has not been presented yet.

True when needRender has requested a frame that has not been presented yet.

Link copied to clipboard
lateinit var nsView: NSView

Underlying NSView

Link copied to clipboard

Pixel geometry corresponding to graphics device which renders this layer

Pixel geometry corresponding to graphics device which renders this layer

Pixel geometry corresponding to graphics device which renders this layer

Link copied to clipboard
Link copied to clipboard

Current graphics API used for rendering.

Graphics API used by the native macOS renderer.

Current graphics API used for rendering.

Link copied to clipboard

Current view used for rendering.

Implements rendering logic and events processing.

Current view used for rendering.

Link copied to clipboard
Link copied to clipboard

Whether the attached Win32 window should expose a composited buffer with per-pixel alpha.

Functions

Link copied to clipboard
actual fun attachTo(container: Any)

Attach this SkikoRenderDelegate to platform container. Actual type of attach container is platform-specific.

actual fun attachTo(container: Any)
actual fun attachTo(container: Any)

Attach this SkikoRenderDelegate to platform container. Actual type of attach container is platform-specific.

Link copied to clipboard
actual fun detach()

Detach this SkikoRenderDelegate from platform container.

actual fun detach()

Detach this SkikoRenderDelegate from platform container.

actual fun detach()

Detach this SkikoRenderDelegate from platform container.

Link copied to clipboard
fun drawOpenGlTexture(textureId: Int, width: Int, height: Int, canvas: Canvas)
fun drawOpenGlTexture(textureId: Int, width: Int, height: Int, canvas: Canvas)
fun drawOpenGlTexture(textureId: Int, width: Int, height: Int, canvas: Canvas)
Link copied to clipboard
Link copied to clipboard
actual fun needRedraw()
actual fun needRedraw()
actual fun needRedraw()
Link copied to clipboard
actual fun needRender(throttledToVsync: Boolean)

Request redrawing of the content; The renderDelegate will be asked to re-render, and the result will be drawn on the screen.

actual fun needRender(throttledToVsync: Boolean)

Schedules a frame to an appropriate moment.

actual fun needRender(throttledToVsync: Boolean)

Request redrawing of the content; The renderDelegate will be asked to re-render, and the result will be drawn on the screen.

Link copied to clipboard
fun render(force: Boolean = false): Boolean

Renders a pending frame. The embedding toolkit calls this from its native window thread.

fun render(force: Boolean = false): Boolean
fun render(force: Boolean = false): Boolean

Renders one pending frame on the thread that owns the attached HWND.

Link copied to clipboard
fun snapshot(width: Int, height: Int): Bitmap
fun snapshot(width: Int, height: Int): Bitmap
fun snapshot(width: Int, height: Int): Bitmap
Link copied to clipboard
fun <T> withOpenGlContext(block: () -> T): T
fun <T> withOpenGlContext(block: () -> T): T
fun <T> withOpenGlContext(block: () -> T): T