1. 08 Apr, 2025 2 commits
    • Igor Demin's avatar
      Revert "SKIKO-1013: Migrate skiko android target to proper androidTarget using AGP" (#1044) · c1f28386
      Igor Demin authored
      Reverts JetBrains/skiko#1043
      
      ```
      ./gradlew publishKotlinMultiplatformPublicationToComposeRepoRepository
      ```
      Fails on CI
      c1f28386
    • Clément de La Bourdonnaye's avatar
      SKIKO-1013: Migrate skiko android target to proper androidTarget using AGP (#1043) · c4e8d4dc
      Clément de La Bourdonnaye authored
      This also fixes SKIKO-934 by making the dependency between
      `merge*JniLibFolders` and `unzip*` tasks explicit (the patch actually
      adds too much dependencies but this should be limited to android tasks).
      After this patch the android sample works from my configuration (might
      be worth checking if other issues are still relevant?).
      
      Few things to consider for review:
      - I've changed versions of Gradle / AGP / Kotlin until I got something
      working on both samples and library side.
      - If `ANDROID_SDK_ROOT` environment variable was specified on a CI
      before, it should now be `ANDROID_HOME` to work with android gradle
      plugin (internal utilities will work with both).
      - I've introduce some lazyness in configurations (`matching { ... }`),
      as android plugin and previous code would race (android seems to declare
      it's configurations quite late). If there's a better way to express it,
      please let me know!
      c4e8d4dc
  2. 31 Mar, 2025 1 commit
  3. 28 Mar, 2025 1 commit
  4. 27 Mar, 2025 1 commit
  5. 26 Mar, 2025 1 commit
  6. 19 Mar, 2025 2 commits
  7. 11 Mar, 2025 1 commit
  8. 10 Mar, 2025 1 commit
  9. 04 Mar, 2025 1 commit
  10. 28 Feb, 2025 1 commit
    • Alexander Maryanovsky's avatar
      Expose ICUs u_hasBinaryProperty (#1029) · 8620e193
      Alexander Maryanovsky authored
      This is needed to detect emojis in Compose Multiplatform.
      
      Also, it looks like the native implementations of
      `String.intCodePoints()` were broken. I fixed them by copying the
      relevant code from Compose.
      8620e193
  11. 24 Feb, 2025 1 commit
  12. 19 Feb, 2025 1 commit
  13. 14 Feb, 2025 1 commit
  14. 12 Feb, 2025 2 commits
  15. 11 Feb, 2025 1 commit
    • Alovchin91's avatar
      Remove BreakIterator.clone() method (#1024) · 3f95f4e7
      Alovchin91 authored
      This PR is split-off from and is a prerequisite of Clang-cl PR: #1020
      
      BreakIterator.clone() is broken on JVM and seemingly leads to a
      use-after-free behaviour. Clang-cl makes this issue more visible, likely
      due to address sanitisation.
      
      Explanation why it is deleted in an internal channel:
      https://jetbrains.slack.com/archives/C02DDNREC77/p1738678000232729
      * `breakIteratorCloneTest` is failing with an access violation in Debug
      mode with additional checks, so using it wasn't safe
      * it is not used anywhere
      
      This is a breaking change and will require bumping Skiko version to
      0.9.0.
      3f95f4e7
  16. 05 Feb, 2025 1 commit
  17. 31 Jan, 2025 1 commit
  18. 30 Jan, 2025 1 commit
    • Ivan Matkov's avatar
      Adoption of `RenderNode` approach (#1014) · 09dae793
      Ivan Matkov authored
      It is a simplified adoption of Android's `RenderNode`.
      
      ```kt
      /**
       * <p>RenderNode is used to build hardware accelerated rendering hierarchies. Each RenderNode
       * contains both a display list as well as a set of properties that affect the rendering of the
       * display list. RenderNodes are used internally for all Views by default and are not typically
       * used directly.</p>
       *
       * <p>RenderNodes are used to divide up the rendering content of a complex scene into smaller
       * pieces that can then be updated individually more cheaply. Updating part of the scene only needs
       * to update the display list or properties of a small number of RenderNode instead of redrawing
       * everything from scratch. A RenderNode only needs its display list re-recorded when its content
       * alone should be changed. RenderNodes can also be transformed without re-recording the display
       * list through the transform properties.</p>
       ```
       
       This is a more correct approach to make `GraphicsLayer` in Compose invalidation independently.
       - Moved drawing callback to C++ side to avoid extra interop costs
       - Switched from `SkPicture` placeholder to custom `SkDrawable` implementation
      09dae793
  19. 27 Jan, 2025 1 commit
    • Igor Demin's avatar
      DirectXOffscreenContext to allow drawing into offscreen texture (#1016) · 1af72c1c
      Igor Demin authored
      Needed to run benchmarks without vsync interference.
      
      The code extracted from Direct3DSwingRedrawer with minimal changes.
      
      - implementation for other API will be added when it is needed (Metal is
      considered later)
      - there are no plans to make commonMain abstraction in `skiko` as it is
      not needed at the moment
      
      ## Testing
      - manually in benchmarks with this code:
      ```
      @OptIn(ExperimentalSkikoApi::class)
      class DirectXGraphicsContext() : DesktopGraphicsContext {
          private val context = DirectXOffscreenContext()
          private var texture: DirectXOffscreenContext.Texture? = null
      
          override fun surface(width: Int, height: Int): Surface {
              texture?.close()
              texture = context.Texture(width, height)
              return Surface.makeFromBackendRenderTarget(
                  context.directContext,
                  texture!!.backendRenderTarget,
                  SurfaceOrigin.TOP_LEFT,
                  SurfaceColorFormat.BGRA_8888,
                  ColorSpace.sRGB,
                  SurfaceProps(pixelGeometry = PixelGeometry.UNKNOWN)
              ) ?: throw IllegalStateException("Can't create Surface")
          }
      
          override suspend fun awaitGPUCompletion() {
              texture?.waitForCompletion()
          }
      
          override fun close() {
              texture?.close()
              context.close()
          }
      }
      
      interface DesktopGraphicsContext : GraphicsContext, AutoCloseable
      ```
      - new test for SkiaSwingLayer
      - new test for DirectXOffscreenContext
      1af72c1c
  20. 24 Jan, 2025 1 commit
  21. 20 Jan, 2025 2 commits
  22. 15 Jan, 2025 1 commit
  23. 14 Jan, 2025 2 commits
  24. 13 Jan, 2025 1 commit
  25. 07 Jan, 2025 1 commit
  26. 12 Dec, 2024 2 commits
  27. 09 Dec, 2024 1 commit
    • jakub-senohrabek-jb's avatar
      Allow setting skiko properties using skiko.properties file inside jar (#994) · bccb17a4
      jakub-senohrabek-jb authored
      In order to use two different versions of skiko in one app (using
      multiple classloaders), it is required to use the unpacking strategy, as
      the skiko.library.path is a system property, which is same for all
      classloaders.
      
      This change will allow to use presigned natives shipped together with
      the app, while still being able to use multiple versions as the property
      skiko.library.path will be loaded from current classloader resources,
      with fallback to system property.
      Co-authored-by: 's avatarJakub Senohrabek <jakub@senohrabek.net>
      bccb17a4
  28. 03 Dec, 2024 1 commit
  29. 01 Nov, 2024 1 commit
  30. 31 Oct, 2024 1 commit
  31. 29 Oct, 2024 1 commit
  32. 22 Oct, 2024 1 commit
  33. 18 Oct, 2024 1 commit
  34. 25 Sep, 2024 1 commit