From 55034ffcd26baec36e5b31915d071fcce25de5f5 Mon Sep 17 00:00:00 2001 From: Ilia Ki Date: Sat, 18 May 2024 21:52:18 +0700 Subject: [PATCH] Fix PixelRef.rowBytes type BTW, `PixelRef` is missing `pixels` pointer. --- skiko/src/commonMain/kotlin/org/jetbrains/skia/PixelRef.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/skiko/src/commonMain/kotlin/org/jetbrains/skia/PixelRef.kt b/skiko/src/commonMain/kotlin/org/jetbrains/skia/PixelRef.kt index b44125c09..122f101be 100644 --- a/skiko/src/commonMain/kotlin/org/jetbrains/skia/PixelRef.kt +++ b/skiko/src/commonMain/kotlin/org/jetbrains/skia/PixelRef.kt @@ -27,7 +27,7 @@ class PixelRef internal constructor(ptr: NativePointer) : RefCnt(ptr) { } finally { reachabilityBarrier(this) } - val rowBytes: NativePointer + val rowBytes: Int get() = try { Stats.onNativeCall() PixelRef_nGetRowBytes(_ptr) @@ -85,7 +85,7 @@ class PixelRef internal constructor(ptr: NativePointer) : RefCnt(ptr) { @ExternalSymbolName("org_jetbrains_skia_PixelRef__1nGetRowBytes") @ModuleImport("./skiko.mjs", "org_jetbrains_skia_PixelRef__1nGetRowBytes") -private external fun PixelRef_nGetRowBytes(ptr: NativePointer): NativePointer +private external fun PixelRef_nGetRowBytes(ptr: NativePointer): Int @ExternalSymbolName("org_jetbrains_skia_PixelRef__1nGetGenerationId") @ModuleImport("./skiko.mjs", "org_jetbrains_skia_PixelRef__1nGetGenerationId") @@ -109,4 +109,4 @@ private external fun _nGetWidth(ptr: NativePointer): Int @ExternalSymbolName("org_jetbrains_skia_PixelRef__1nGetHeight") @ModuleImport("./skiko.mjs", "org_jetbrains_skia_PixelRef__1nGetHeight") -private external fun _nGetHeight(ptr: NativePointer): Int \ No newline at end of file +private external fun _nGetHeight(ptr: NativePointer): Int