Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ShirasawaSama committed Dec 27, 2023
1 parent 29ff040 commit 477856f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,6 @@ private val nDrawRect: MethodHandle? = try {
null
}

/*
ptr: NativePointer,
verticesMode: Int,
vertexCount: Int,
cubics: InteropPointer,
colors: InteropPointer,
texCoords: InteropPointer,
indexCount: Int,
indices: InteropPointer,
blendMode: Int,
paintPtr: NativePointer
*/
private val nDrawVertices: MethodHandle? = try {
MethodHandles.lookup().unreflect(Class.forName("org.jetbrains.skia.CanvasKt")
.getDeclaredMethod("_nDrawVertices", NativePointer::class.java, Int::class.java,
Expand Down Expand Up @@ -130,11 +118,11 @@ fun NativePainter(modifier: Modifier, block: Canvas.(size: Size) -> Unit) {
}
onDrawBehind {
val img = image
if (img == null) {
if (img == null || img.isClosed) {
if (size.width != 0F && size.height != 0F) drawContext.canvas.nativeCanvas.block(size)
} else {
drawContext.canvas.nativeCanvas.drawImage(img, 0F, 0F)
if (!img.isClosed) img.close()
img.close()
}
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ class AudioThumbnail private constructor(
return tempArray
}

// 树状数组初始化
private fun buildTree() {
repeat(channels) {
val minT = minTree[it]
Expand Down

0 comments on commit 477856f

Please sign in to comment.