Commit 4c99e1d3 authored by Igor Demin's avatar Igor Demin

SkiaWindowPerfomanceTest. Fix compilation issue

parent 6e79a5c8
...@@ -44,9 +44,7 @@ native crash in SkiaWindowTest "render single window" ...@@ -44,9 +44,7 @@ native crash in SkiaWindowTest "render single window"
// .popStyle() // .popStyle()
// .build() // .build()
@Test private class TestWindow(
fun `FPS is near display refresh rate (multiple windows)`() = swingTest {
class TestWindow(
width: Int, width: Int,
height: Int, height: Int,
private val frameCount: Int, private val frameCount: Int,
...@@ -126,12 +124,14 @@ native crash in SkiaWindowTest "render single window" ...@@ -126,12 +124,14 @@ native crash in SkiaWindowTest "render single window"
} }
} }
suspend fun awaitFrameCollection(windows: List<TestWindow>) { private suspend fun awaitFrameCollection(windows: List<TestWindow>) {
while (!windows.all(TestWindow::isCollected)) { while (!windows.all(TestWindow::isCollected)) {
delay(100) delay(100)
} }
} }
@Test
fun `FPS is near display refresh rate (multiple windows)`() = swingTest {
val windows = (1..3).map { index -> val windows = (1..3).map { index ->
TestWindow(width = 40, height = 20, frameCount = 300, deviatedTerminalCount = 10).apply { TestWindow(width = 40, height = 20, frameCount = 300, deviatedTerminalCount = 10).apply {
location = Point((index + 1) * 200, 200) location = Point((index + 1) * 200, 200)
......
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