Skip to content

Commit

Permalink
Allow paint before showing (#941)
Browse files Browse the repository at this point in the history
Fix compose tests after #923
  • Loading branch information
MatkovIvan authored Jun 13, 2024
1 parent 3e41541 commit a03d0a5
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,15 +335,13 @@ actual open class SkiaLayer internal constructor(
//
// Please note that calling redraw during layout might break software renderers,
// so applying this fix only for Direct3D case.
if (renderApi == GraphicsApi.DIRECT3D) {
if (renderApi == GraphicsApi.DIRECT3D && isShowing) {
redrawer?.syncSize()
tryRedrawImmediately()
}
}

private fun tryRedrawImmediately() {
if (!isShowing) return

// It might be called inside `renderDelegate`,
// so to avoid recursive call (not supported) just schedule redrawing.
//
Expand Down

0 comments on commit a03d0a5

Please sign in to comment.