Files
skiko/dependencies.toml
Sebastiano PoggiandIgor Demin 74ce67b5bf [SKIKO-1082] Fix Metal Swing offscreen rendering crash when drawing to a SW renderer (#1190)
This PR fixes Metal Swing offscreen rendering behavior when the active
`GraphicsConfiguration` is not compatible with JBR shared textures, and
adds focused regression tests for the fallback path.
`AcceleratedSwingPainter` now explicitly falls back to software painting
for incompatible graphics configurations (for example,
offscreen/`BufferedImage` paint flows).

## Changes

- Introduced `SharedTexturesAdapter` as a small abstraction over JBR
shared textures so production code keeps using JBR while tests can
inject a fake adapter.
- Updated `MetalSwingRedrawer` to create and pass the shared texture
adapter into `AcceleratedSwingPainter`.
- Updated `AcceleratedSwingPainter` to support test injection and
preserve fallback behaviour for incompatible graphics configurations.
- Added minimal test hooks in `AcceleratedSwingPainter` with
`org.jetbrains.annotations.VisibleForTesting` so tests can validate
cache-reset behaviour.
- Added `org.jetbrains:annotations` as an `awtMain` dependency to use
`VisibleForTesting`. I can undo this and remove the annotation, but I
think it's worth keeping...
- Added `AcceleratedSwingPainterTest` covering:
  - fallback is used for incompatible `GraphicsConfiguration`
  - accelerated cache state is cleared on fallback
  - `dispose()` delegates to fallback painter

---

Fixes https://youtrack.jetbrains.com/issue/SKIKO-1082

---------

Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
2026-04-23 11:34:33 +01:00

36 lines
1.9 KiB
TOML

[versions]
kotlin = "2.3.20"
kotlinxBrowser = "0.5.0"
coroutines = "1.8.0"
jetbrainsRuntime-api = "1.5.0"
androidGradlePlugin = "8.2.2"
dokka = "1.9.10"
buildHelpers-publishing = "0.1.28"
githubApi = "1.329"
gradleDownloadTask = "5.5.0"
cryptoChecksumPlugin = "1.4.0"
kotlinxBenchmark = "0.4.14"
[libraries]
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
coroutines-core-jvm = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm", version.ref = "coroutines" }
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
jetbrainsRuntime-api = { module = "org.jetbrains.runtime:jbr-api", version.ref = "jetbrainsRuntime-api" }
kotlinx-browser = { module = "org.jetbrains.kotlinx:kotlinx-browser", version.ref = "kotlinxBrowser" }
android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" }
dokka-gradlePlugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
gradleDownloadTask-gradlePlugin = { module = "de.undercouch:gradle-download-task", version.ref = "gradleDownloadTask" }
githubApi = { module = "org.kohsuke:github-api", version.ref = "githubApi" }
buildHelpers-publishing-gradlePlugin = { module = "org.jetbrains.compose.internal.build-helpers:publishing", version.ref = "buildHelpers-publishing" }
crypto-checksum-gradlePlugin = { module = "gradle.plugin.org.gradle.crypto:checksum", version.ref = "cryptoChecksumPlugin" }
kotlinx-benchmark-gradlePlugin = { module = "org.jetbrains.kotlinx:kotlinx-benchmark-plugin", version.ref = "kotlinxBenchmark" }
kotlinx-benchmark-runtime = { module = "org.jetbrains.kotlinx:kotlinx-benchmark-runtime", version.ref = "kotlinxBenchmark"}