Unverified Commit a03d0a59 authored by Ivan Matkov's avatar Ivan Matkov Committed by GitHub

Allow paint before showing (#941)

Fix compose tests after #923
parent 3e41541e
...@@ -335,15 +335,13 @@ actual open class SkiaLayer internal constructor( ...@@ -335,15 +335,13 @@ actual open class SkiaLayer internal constructor(
// //
// Please note that calling redraw during layout might break software renderers, // Please note that calling redraw during layout might break software renderers,
// so applying this fix only for Direct3D case. // so applying this fix only for Direct3D case.
if (renderApi == GraphicsApi.DIRECT3D) { if (renderApi == GraphicsApi.DIRECT3D && isShowing) {
redrawer?.syncSize() redrawer?.syncSize()
tryRedrawImmediately() tryRedrawImmediately()
} }
} }
private fun tryRedrawImmediately() { private fun tryRedrawImmediately() {
if (!isShowing) return
// It might be called inside `renderDelegate`, // It might be called inside `renderDelegate`,
// so to avoid recursive call (not supported) just schedule redrawing. // so to avoid recursive call (not supported) just schedule redrawing.
// //
......
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