Unverified Commit 4d4dc810 authored by Igor Demin's avatar Igor Demin Committed by GitHub

Add comment about Benchmarks in Compose using the internal Skiko rendering logic (#1035)

parent 997495a5
...@@ -537,6 +537,10 @@ actual open class SkiaLayer internal constructor( ...@@ -537,6 +537,10 @@ actual open class SkiaLayer internal constructor(
FrameWatcher.nextFrame() FrameWatcher.nextFrame()
fpsCounter?.tick() fpsCounter?.tick()
// The current approach is to render into a picture in the main thread, and render this picture in the render thread
// If this approach will be changed, create an issue in https://youtrack.jetbrains.com/issues/CMP for changing it in
// https://github.com/JetBrains/compose-multiplatform/blob/e4e2d329709cded91a09cc612d4defbce37aad96/benchmarks/multiplatform/benchmarks/src/commonMain/kotlin/MeasureComposable.kt#L151 as well
val pictureWidth = (width * contentScale).toInt().coerceAtLeast(0) val pictureWidth = (width * contentScale).toInt().coerceAtLeast(0)
val pictureHeight = (height * contentScale).toInt().coerceAtLeast(0) val pictureHeight = (height * contentScale).toInt().coerceAtLeast(0)
...@@ -688,4 +692,4 @@ private fun adjustSizeToContentScale(contentScale: Float, value: Int): Int { ...@@ -688,4 +692,4 @@ private fun adjustSizeToContentScale(contentScale: Float, value: Int): Int {
} else { } else {
value value
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment