Skip to content

Commit

Permalink
Revert "Fixed case when user get low refresh rate with VRR capable di…
Browse files Browse the repository at this point in the history
…splay. (#475)" (#479)

This reverts commit 70f772a.
  • Loading branch information
Rsedaikin authored Feb 7, 2022
1 parent 8e68ca0 commit 9a95f21
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions skiko/src/awtMain/kotlin/org/jetbrains/skiko/SkiaLayer.awt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ actual open class SkiaLayer internal constructor(
val canvas: java.awt.Canvas
get() = backedLayer

private var vrrDisplayLocker: JPanel? = null

init {
isOpaque = false
layout = null
Expand Down Expand Up @@ -249,14 +247,6 @@ actual open class SkiaLayer internal constructor(
renderApi = fallbackRenderApiQueue.removeAt(0)
redrawer?.dispose()
redrawer = renderFactory.createRedrawer(this, renderApi, properties)
vrrDisplayLocker?.let { remove(it) }
if (hostOs == OS.Windows && (renderApi == GraphicsApi.DIRECT3D || renderApi == GraphicsApi.OPENGL)) {
vrrDisplayLocker = JPanel().apply {
background = Color(0, 0, 0, 0)
setBounds(0, 0, 1, 1)
}
add(vrrDisplayLocker, Integer.valueOf(0))
}
redrawer?.syncSize()
} catch (e: RenderException) {
println(e.message)
Expand Down Expand Up @@ -317,7 +307,6 @@ actual open class SkiaLayer internal constructor(
}
super.setBounds(x, y, roundedWidth, roundedHeight)
backedLayer.setSize(roundedWidth, roundedHeight)
vrrDisplayLocker?.setBounds(0, 0, 1, 1)
redrawer?.syncSize()
}

Expand Down

0 comments on commit 9a95f21

Please sign in to comment.