- 18 Sep, 2024 2 commits
-
-
Andrei Salavei authored
Fixes the following error when calling `URIHandler_openUri` on iOS 18: ``` The caller of UIApplication.openURL(_:) needs to migrate to the non-deprecated UIApplication.open(_:options:completionHandler:). Force returning false (NO). ``` Fixes: https://youtrack.jetbrains.com/issue/CMP-6699
-
Ivan Matkov authored
Support configurable vertical centering for implementing Compose's `LineHeightStyle.Alignment`. https://youtrack.jetbrains.com/issue/CMP-2602 See also: - https://github.com/JetBrains/skia/pull/5 - https://github.com/JetBrains/compose-multiplatform-core/pull/1569
-
- 17 Sep, 2024 1 commit
-
-
Igor Demin authored
Fixes https://youtrack.jetbrains.com/issue/CMP-5856/Desktop-ComposePanel-size-breaks-with-.fillMax-modifiers#focus=Comments-27-10632441.0-0 Fixes https://youtrack.jetbrains.com/issue/CMP-5968/Compose-content-is-rendered-in-the-wrong-place-in-IJ-when-using-AWT-compositing Regression after https://github.com/JetBrains/skiko/pull/661/files#diff-910a6e28fda20a00bc98c6a8a04f74ab701d79e841b9baddf146b810e610572fR363 (`setBounds` is called more often, but not enough as `ancestorMoved`) When a panel changes its position without changing its size, `doLayout` isn't called because the content itself wasn't changed. But we still need to update the bounds of the underlying layer. ## Testing - https://youtrack.jetbrains.com/issue/CMP-5856/Desktop-ComposePanel-size-breaks-with-.fillMax-modifiers#focus=Comments-27-10632441.0-0 isn't reproducible after the fix - there are no resize glitches ## Release Notes ### Fixes - Fix bounds of ComposePanel in IntelliJ on macOs
-
- 09 Sep, 2024 1 commit
-
-
Oleksandr Karpovich authored
Adding a new flag `-Pskiko.wasm.withProfiling=true` which adds `--profiling` flag to emcc, so it preserves the function names - makes it easier to use the browser profiler. By default, it's disabled.
-
- 16 Aug, 2024 1 commit
-
-
Shagen Ogandzhanian authored
-
- 14 Aug, 2024 1 commit
-
-
Niclas authored
-
- 12 Aug, 2024 2 commits
-
-
Niclas authored
See https://github.com/JetBrains/skiko/issues/973
-
Oleksandr Karpovich authored
Skia-pack used in this skiko: https://github.com/JetBrains/skia-pack/releases/tag/m126-1d69d9b-2
-
- 07 Aug, 2024 1 commit
-
-
Shagen Ogandzhanian authored
This is supposed to be fix for https://github.com/JetBrains/skiko/issues/967 The idea is pass strings as (utf8) byte arrays directly through the border just like we do it on native
-
- 05 Aug, 2024 1 commit
-
-
Oleksandr Karpovich authored
The download directory path now depends on the buildType: Debug and Release ___ It affected our buildServer CI pipeline where it builds Release first and then Debug. And downloadTask was considered UP-TO-DATE when Debug build was attempted. Therefore the build used "Release" version of skia instead of "Debug. " Added a Debug build to the githiub workflow too.
-
- 02 Aug, 2024 1 commit
-
-
Pavel authored
Add a flag to control number of buffers used by Metal. Add a flag to control Vsync on window resize (#968) #### Number of buffers MacOS [doc](https://developer.apple.com/documentation/quartzcore/cametallayer/2938720-maximumdrawablecount?language=objc). As far as I know AWT uses double buffering by default. So we would like to experiment with this setting in Fleet. Also I expect that double buffering should reduce user interaction latency. #### Control VSync on window resize I've noticed that on Linux and Windows we don't wait for VSync when repainting synchronously, but only on macOS we do. I suspect that locking EDT when we are waiting for VSync might lead to problems with app responsivenes. So it would be nice to experiment with this setting.
-
- 30 Jul, 2024 1 commit
-
-
Elijah Semyonov authored
Usage of main-thread AppKit APIs in other thread is assumed to lead to the crash. Second attempt for https://github.com/JetBrains/skiko/pull/958. Structure display link control reactively around Wake/Sleep and Screen change notifications. --------- Co-authored-by:
Igor Demin <igordmn@users.noreply.github.com>
-
- 23 Jul, 2024 2 commits
-
-
Shagen Ogandzhanian authored
One still can use optional platfrom-specific skia dependencies using exactly the property which was used before, however, by default all build targets are using the same version of skia prebuilt artefacts.
-
Shagen Ogandzhanian authored
This commit is first step in set of actions we need to take to build skia-package via gradle in the skiko repository However it makes sense on it's own as well.
-
- 10 Jul, 2024 1 commit
-
-
Alovchin91 authored
This PR adds Windows Jump Lists support to AWT and fixes compilation on Visual Studio 2022.
-
- 09 Jul, 2024 3 commits
-
-
Shagen Ogandzhanian authored
Co-authored-by:Ivan Matkov <ivan.matkov@jetbrains.com>
-
Abdelilah El Aissaoui authored
Updated to the latest version because otherwise the example in the readme does not build because SkiaLayerRenderDelegate is missing
-
- 19 Jun, 2024 1 commit
-
-
Oleksandr Karpovich authored
New API: ```kotlin fun TypefaceFontProvider.createAsFallbackProvider(): TypefaceFontProvider fun FontMgr.defaultWithFallbackFontProvider(fallback: TypefaceFontProvider): FontMgr ``` Usage: ```kotlin val fontCollection = FontCollection() val notoEmojiTypeface = Typeface.makeFromData(Data.makeFromBytes(notoEmojisBytes)) val fallbackProvider = TypefaceFontProvider.createAsFallbackProvider().apply { registerTypeface(notoEmojiTypeface) } fontCollection.setDefaultFontManager(FontMgr.defaultWithFallbackFontProvider(fallbackProvider)) ``` <img width="400" alt="Screenshot 2024-06-07 at 14 48 28" src="https://github.com/JetBrains/skiko/assets/7372778/76dc1330-d8e2-4be7-ad92-68214b058b4f">
-
- 13 Jun, 2024 1 commit
-
-
Ivan Matkov authored
Fix compose tests after #923
-
- 12 Jun, 2024 2 commits
-
-
Elijah Semyonov authored
-
Elijah Semyonov authored
-
- 11 Jun, 2024 2 commits
-
-
Igor Demin authored
-
Ivan Matkov authored
Add forgotten setter for linear metrics. Changed it to property. Original functions have names [`isLinearMetrics`](https://github.com/JetBrains/skia/blob/6726cd3e1ac4f30d6874c278008cdf24dfc9b470/include/core/SkFont.h#L115-L119C12) and [`setLinearMetrics`](https://github.com/JetBrains/skia/blob/6726cd3e1ac4f30d6874c278008cdf24dfc9b470/include/core/SkFont.h#L156-L163)
-
- 10 Jun, 2024 1 commit
-
-
Ivan Matkov authored
It's unconditionally de-ref the pointer that causes crash in case of nulls https://github.com/JetBrains/skiko/blob/c66eebc2c23a8b41eb618c715296c2a7dd135f43/skiko/src/jvmMain/cpp/common/paragraph/Paragraph.cc#L206
-
- 28 May, 2024 1 commit
-
-
Ivan Matkov authored
Fixes a couple of issues like: https://github.com/JetBrains/compose-multiplatform/issues/4744 (TODO: collect all references) Before (slow-mo) https://github.com/JetBrains/skiko/assets/1836384/5768b139-d08f-4142-8c14-2969107807f9 After (slow-mo) https://github.com/JetBrains/skiko/assets/1836384/cc9a5103-3d30-412e-a5a4-baf590d657b8
-
- 27 May, 2024 1 commit
-
-
Elijah Semyonov authored
Speculative fix for [a case](https://github.com/JetBrains/compose-multiplatform/issues/4761), where a lot of windows are created and dismissed. Caches command queue per device [similar to iOS](https://github.com/JetBrains/compose-multiplatform-core/pull/1127)
-
- 21 May, 2024 2 commits
-
-
Ilya Ryzhenkov authored
-
Elijah Semyonov authored
Speculative fix for [a freeze issue](https://youtrack.jetbrains.com/issue/COMPOSE-1441/Desktop-skiko-freeze-after-sleep-on-Mac-with-multiple-external-monitors).
-
- 09 May, 2024 1 commit
-
-
Alexander Maryanovsky authored
-
- 26 Apr, 2024 1 commit
-
-
Elijah Semyonov authored
### Changes Throw `RenderException` when constructing `Direct3DSwingRedrawer` with `nullptr` device. (Similar to `Direct3DRedrawer`) To avoid crash in: ``` DirectXOffscreenDevice *d3dDevice = fromJavaPointer<DirectXOffscreenDevice *>(devicePtr); GrD3DBackendContext backendContext = d3dDevice->backendContext; return toJavaPointer(GrDirectContext::MakeDirect3D(backendContext).release()); ``` ### Fixes Speculative fix for crash with a stack head below: ``` --------------- T H R E A D --------------- Current thread (0x000001cbcb0793f0): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=16744, stack(0x0000009488c00000,0x0000009488d00000)] Stack: [0x0000009488c00000,0x0000009488d00000], sp=0x0000009488cfc670, free space=1009k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [skiko-windows-x64.dll+0x58afa] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.jetbrains.skiko.swing.Direct3DSwingRedrawer.makeDirectXContext(J)J+0 ``` ### Note I've found suspicious place in ```kotlin // RedrawManager.kt:30 _renderApi = fallbackRenderApiQueue.removeAt(0) _redrawer = redrawerFactory(_renderApi, redrawer) ``` Seems like `redrawer` is disposed twice if `redrawerFactory` throws (both paths constructing `RedrawerManager` are affected). @igordmn can you have a look? It's a universal path for all desktop users, so I wonder why it didn't backfire, if it's indeed incorrect. May be it's because we don't really call `redrawerFactory` if a redrawer was constructed correctly, so disposal of old one doesn't ever get called in this context. I'm not sure where are the invariant boundaries here.
-
- 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
-