- 18 Apr, 2024 1 commit
-
-
Igor Demin authored
To allow using OpenGL on macOs, call: ``` System.setProperty("skiko.macos.opengl.enabled", "true") ``` By request from user in DM who uses LWJGL+Skiko on macOS.
-
- 17 Apr, 2024 1 commit
-
-
Pavel authored
exists
-
- 16 Apr, 2024 1 commit
-
-
Igor Demin authored
## Issues fixed Some CI don't have this library and when we run an application we have a crash: ``` ...\skiko-windows-x64.dll: Can't find dependent libraries java.lang.UnsatisfiedLinkError: ...\skiko-windows-x64.dll: Can't find dependent libraries at java.base/jdk.internal.loader.NativeLibraries.load(Native Method) at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174) at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2394) at java.base/java.lang.Runtime.load0(Runtime.java:755) at java.base/java.lang.System.load(System.java:1957) at org.jetbrains.skiko.Library.loadLibraryOrCopy(Library.kt:17) at org.jetbrains.skiko.Library.findAndLoad(Library.kt:111) at org.jetbrains.skiko.Library.load(Library.kt:56) at org.jetbrains.skia.impl.Library$Companion.staticLoad(Library.jvm.kt:12) at org.jetbrains.skia.Surface.<clinit>(Surface.kt:539) at androidx.compose.ui.test.SkikoComposeUiTest.<init>(ComposeUiTest.skikoMain.kt:172) at androidx.compose.ui.test.SkikoComposeUiTest.<init>(ComposeUiTest.skikoMain.kt:118) at androidx.compose.ui.test.SkikoComposeUiTest.<init>(ComposeUiTest.skikoMain.kt:139) at androidx.compose.ui.test.SkikoComposeUiTest.<init>(ComposeUiTest.skikoMain.kt:134) at androidx.compose.ui.test.junit4.DesktopComposeTestRule.<init>(DesktopComposeTestRule.desktop.kt:54) at androidx.compose.ui.test.junit4.DesktopComposeTestRule_desktopKt.createComposeRule(DesktopComposeTestRule.desktop.kt:41) ``` Reported in https://jetbrains.slack.com/archives/C5VQN94SH/p1712564847131459?thread_ts=1712091431.760099&cid=C5VQN94SH ## Proposed changes Load this library in runtime, and fallback to `CreateSwapChainForComposition` ## Testing 1. Run Compose with transparent window: ``` import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.Surface import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.draw.shadow import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Window import androidx.compose.ui.window.application import androidx.compose.material.Text import androidx.compose.runtime.* fun main() = application { var isOpen by remember { mutableStateOf(true) } if (isOpen) { Window( onCloseRequest = { isOpen = false }, title = "Transparent Window Example", transparent = true, undecorated = true, //transparent window must be undecorated ) { Surface( modifier = Modifier.fillMaxSize().padding(5.dp).shadow(3.dp, RoundedCornerShape(20.dp)), color = Color(55, 55, 55), shape = RoundedCornerShape(20.dp) //window has round corners now ) { Text("Hello World!", color = Color.White) } } } } ``` Transparency should work, there shouldn't be errors in the log. 2. change `transparent = false` Transparency shouldn't work, there shouldn't be errors in the log. This should be tested by QA. --------- Co-authored-by:
Ivan Matkov <ivan.matkov@jetbrains.com>
-
- 04 Apr, 2024 1 commit
-
-
Ivan Matkov authored
skiko is supposed to be a wrapper around skia, however it has unrelated features like input. This PR removes it from this library - it's supposed to be handled externally. - Removed `SkikoInput`, `SkikoKey`, `SkikoPlatform*Event` - Replaced `SkikoView` to `SkikoRenderDelegate` and related field in `SkiaLayer` - `SkiaLayer` on macOS native now receives `NSView` instead of creating it internally and attaching it to the `NSWindow`. In theory, it allows initializing non-full-window skia view there (not tested) - Updated samples and readme
-
- 21 Mar, 2024 1 commit
-
-
Ivan Matkov authored
-
- 15 Mar, 2024 1 commit
-
-
Igor Demin authored
Skiko extracts binaries to `~/.skiko` by default, but it is not always possible. This PR adds a way to override the folder where to extract binaries: ``` System.setProperty("skiko.data.path", File(System.getProperty("java.io.tmpdir")).resolve(".skiko").toString()) ``` Fixes https://github.com/JetBrains/skiko/issues/885 The case seems rare - we only have a crash in tests reported. If we have reports from real users, we have to change the default `~/.skiko` to something else. ## Testing 1 (manual) 1. Run ``` import org.jetbrains.skia.Bitmap import java.io.File fun main() { val path = File(System.getProperty("java.io.tmpdir")).resolve(".skiko").toString() println(path) System.setProperty("skiko.data.path", path) Bitmap() // loads the library } ``` 2. See that `path` is created ## Testing 2 (manual) The default way works: ``` import org.jetbrains.skia.Bitmap fun main() { Bitmap() // loads the library } ```
-
- 13 Mar, 2024 1 commit
-
-
Shagen Ogandzhanian authored
This is the skiko part of https://youtrack.jetbrains.com/issue/COMPOSE-1149/wasm-js-Remove-media-events-from-Skiko This commit introduces following changes: * CanvasRenderer is html-agnostic and deals with NativePointer * SkiaLayer does not set any DOM dimensions of the canvas - it's up to the user of the Skia to resolve this dimensions * Media event listeners are removed completely
-
- 11 Mar, 2024 2 commits
-
-
Ivan Matkov authored
-
Shagen Ogandzhanian authored
-
- 06 Mar, 2024 1 commit
-
-
Igor Demin authored
Fixes https://github.com/JetBrains/compose-multiplatform/issues/4425 It is a regression after https://github.com/JetBrains/skiko/pull/858 The crash was because `d3dDevice->swapChain->GetBuffer` didn't return the buffer to draw on if we reused the buffer from the previous frame (we didn't change `surface` in case of zero size). I am not completely sure why, but I exhausted my the investigation limit and this fix is needed by other reasons (we need to wait for vsync). ## Testing An additional check in the existed test (fails before the fix)
-
- 04 Mar, 2024 1 commit
-
-
Ivan Matkov authored
Merging a fix from `0.7.95.1` to the main branch for https://github.com/JetBrains/compose-multiplatform/issues/4397
-
- 01 Mar, 2024 2 commits
-
-
Oleksandr Karpovich authored
Now we build skia/icu with _skiko suffix to avoid clashes with Apple SDK Corresponding skia change: https://github.com/JetBrains/skia/pull/3 Corresponding skia commit: https://github.com/JetBrains/skia/commit/47d3027b8cbeea76135c0995d5886aa2e58e7512
-
Ivan Matkov authored
It adds a fallback to the old initialization method in case of any problems.
-
- 26 Feb, 2024 2 commits
-
-
Igor Demin authored
Instead, fallback to Software. Discovered during https://github.com/JetBrains/skiko/issues/876 investigation ## Explanation We throw RenderException, and Fallback mechanism catches it and switches to Software ## Testing 1. Setup the system without OpenGL 2. Run SkiaSwingLayer 3. See the native crash
-
Oleksandr Karpovich authored
According to COMPOSE-939
-
- 24 Feb, 2024 1 commit
-
-
Igor Demin authored
And move Windows instructions to the first section Commands for Linux were get from https://github.com/JetBrains/skiko/blob/78f227f19bd4cb811d34fbc2df7befb4f76be355/.github/workflows/ci.yml#L102 Except we use `libx11-dev` instead of `xvfb`. Tested on a new system (but I performed commands in other order, so I am not completely sure that they are all needed)
-
- 22 Feb, 2024 1 commit
-
-
Oleksandr Karpovich authored
-
- 15 Feb, 2024 1 commit
-
-
Pavel authored
* Include <cstdint> is required because of uintptr_t * move `generateVersion` to common code * on Linux with Chinese language chosen in interface this test fails * this combination leads to NaN values when height is overridden * test that empty font still have a meaningful metrics, because FontStyle may rely on it * simplify test * check that we don't put NaN in skia this value might be used as part of key in paragraph cache, which may lead to UB atm
-
- 14 Feb, 2024 1 commit
-
-
Oleksandr Karpovich authored
-
- 10 Feb, 2024 1 commit
-
-
Oleksandr Karpovich authored
* Update skia version - m116-b54492e-1 * test windows * Update skia version to m116-b54492e-3
-
- 09 Feb, 2024 1 commit
-
-
Igor Demin authored
It is a regression after https://github.com/JetBrains/skiko/pull/811 After that PR, OpenGL functions are linked in runtime via function `loadOpenGLLibrary`. We didn't call it in `makeGL` functions. Now we call. Adding also `isLoaded` to avoid loading it multiple times Fixes https://youtrack.jetbrains.com/issue/COMPOSE-642/Fix-Skiko-API-regression-for-creating-OpenGL-context
-
- 07 Feb, 2024 3 commits
-
-
Ivan Matkov authored
-
Ivan Matkov authored
-
Alexander Maryanovsky authored
-
- 06 Feb, 2024 2 commits
-
-
Oleksandr Karpovich authored
-
Shagen Ogandzhanian authored
This is first part of achieving goal of COMPOSE-891
-
- 29 Jan, 2024 1 commit
-
-
Ivan Matkov authored
* Don't try to init D3D with zero size * Pass AWT size for swap chain initialization * Avoid reading size twice
-
- 26 Jan, 2024 1 commit
-
-
Oleksandr Karpovich authored
Download and use a codesign-client from an internal jb repository instead of using a hardcoded one (#859) * Download and use a codesign-client from an internal jb repository instead of using a hardcoded one * Download a codesign-client for hostArch only * Make the downloaded codesign-client executable * Update skiko/buildSrc/src/main/kotlin/tasks/configuration/JvmTasksConfiguration.kt Co-authored-by:
Igor Demin <igordmn@users.noreply.github.com> --------- Co-authored-by:
Igor Demin <igordmn@users.noreply.github.com>
-
- 18 Jan, 2024 1 commit
-
-
jershell authored
* add support for touchscreen events in js for mobile devices * add touchevents for wasm --------- Co-authored-by:dmitriy tukhvatullin <tukhvatullin01@gmail.com>
-
- 08 Jan, 2024 1 commit
-
-
Elijah Semyonov authored
* Add simple wrapper * Start redraw loop
-
- 20 Dec, 2023 2 commits
-
-
Oleksandr Karpovich authored
* Use compiler plugin to generate setup.mjs * Include generation of setup.mjs into build pipeline * Add support of TestHelpers to generation * add mavenCentral repo * Refactoring --------- Co-authored-by:
Ilya Goncharov <ilya.goncharov@jetbrains.com> Co-authored-by:
Oleksandr.Karpovich <a.n.karpovich@gmail.com>
-
Sebastiano Poggi authored
Since https://github.com/JetBrains/compose-multiplatform-core/pull/918, we don't need this code anymore in Compose, which was its only user. The still-relevant code was moved to Compose's desktop target.
-
- 18 Dec, 2023 1 commit
-
-
Oleksandr Karpovich authored
* Refactor interop with js in k/js and k/wasm source sets * Make event conversion functions internal The event conversion functions in the 'Convertors.js.kt' and 'Convertors.wasm.kt' files have been updated from public to internal. * Disable local maven repository * PR fixes --------- Co-authored-by:Oleksandr.Karpovich <oleksandr.karpovich@jetbrains.com>
-
- 15 Dec, 2023 2 commits
-
-
Shagen Ogandzhanian authored
* Argument -Xopt-in is deprecated. Please use -opt-in instead * 'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta
-
Shagen Ogandzhanian authored
* Fix LineMetrics resolution for wasm and js targets This contributes to fixing https://youtrack.jetbrains.com/issue/COMPOSE-108/CfW-fix-TextField-cursor I had to introduce assertCloseEnough sensitive enought to path throughout all our targets * LineMetrics::layoutParagraph idiomatically returns runTest immediately * Rename LineMetrics_nGetArrayElement from longArgs (misleading) to intArgs
-
- 14 Dec, 2023 1 commit
-
-
Oleksandr Karpovich authored
Co-authored-by:Oleksandr.Karpovich <oleksandr.karpovich@jetbrains.com>
-
- 12 Dec, 2023 1 commit
-
-
Ivan Matkov authored
* Transparency support for D3D swap chain * Store composition objects in DirectXDevice * Fix AWT transparent sample
-
- 11 Dec, 2023 3 commits
-
-
Oleksandr Karpovich authored
* Fix k/js tests Make resources reachable in tests * Move k/js CI action configuration to web.yml * Refactor our internal test API --------- Co-authored-by:Oleksandr.Karpovich <oleksandr.karpovich@jetbrains.com>
-
Oleksandr Karpovich authored
Co-authored-by:Oleksandr.Karpovich <oleksandr.karpovich@jetbrains.com>
-
Oleksandr Karpovich authored
Co-authored-by:Oleksandr.Karpovich <oleksandr.karpovich@jetbrains.com>
-