Feat/gpu drivers redesign (#858)

This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-10-16 17:50:45 +00:00
1 parent 7c90879b39
commit 23479d15f5
47 files changed
+556 -139

No files matched your search

@@ -4,8 +4,8 @@ import org.junit.Assert.assertEquals
import org.junit.Test
class LayerStepTest {
@Test fun theStackRunsFromTheProtonDownToTheGpuDrivers() {
assertEquals(listOf(PROTON_TAB, "dxvk", "vkd3d", "fex", GPU_TAB), LAYERS)
@Test fun theStackRunsFromTheGpuDriversDownThroughTheProton() {
assertEquals(listOf(GPU_TAB, PROTON_TAB, "dxvk", "vkd3d", "fex"), LAYERS)
}
@Test fun rbStepsDownAndWraps() {
@@ -19,6 +19,6 @@ class LayerStepTest {
}
@Test fun anUnknownLayerStartsFromTheTop() {
assertEquals("dxvk", layerStep("tab-from-an-older-build", 1))
assertEquals(PROTON_TAB, layerStep("tab-from-an-older-build", 1))
}
}
@@ -2,6 +2,7 @@ package com.droiddeck.launcher.ui
import androidx.compose.ui.geometry.Rect
import androidx.compose.ui.graphics.Path
import androidx.compose.ui.graphics.PathMeasure
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
@@ -9,6 +10,7 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
import org.robolectric.annotation.GraphicsMode
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [28], manifest = Config.NONE)
@@ -44,6 +46,15 @@ class StepOutTest {
assertEquals(pill.bottom, b.bottom, 0.5f)
}
@GraphicsMode(GraphicsMode.Mode.NATIVE)
@Test fun aNearlyClosedOutlineDoesNotDoubleBackPastThePillCorner() {
val path = Path()
stepPath(path, pill, left = pill.left - 1f, bottom = pill.bottom + 2f, pullTop = pill.bottom + 6f, box = 16f, fillet = 10f, pillCorner = 12f)
val length = PathMeasure().apply { setPath(path, false) }.length
val arcs = (Math.PI / 2).toFloat() * (12f + 16f + 15f + 0.5f + 12f)
assertEquals(175f + arcs, length, 2f)
}
@Test fun aCardMarkIsTakenOnceAndOnlyForItsGame() {
StoresMotion.markCard(CardMark("gog:1", pill, 10f, null))
assertNull(StoresMotion.takeCard("gog:2"))