1. 09 Jun, 2026 1 commit
    • Kartikey Garasiya's avatar
      Set render-target usage on the Metal Swing offscreen texture (#1207) · 6bcc77c4
      Kartikey Garasiya authored
      Fixes a crash in offscreen Metal Swing rendering (`SkiaSwingLayer`) when
      running against a Skia build with Metal API validation enabled.
      
      `MetalSwingRedrawer.mm` (`makeMetalTexture`) creates the offscreen
      texture with `texture2DDescriptorWithPixelFormat:...`, which defaults
      `.usage` to `MTLTextureUsageShaderRead`. The same texture is then
      wrapped as a `GrBackendRenderTarget` and rendered into, so on a debug
      Skia `GrMtlGpu::onWrapBackendRenderTarget` asserts:
      
      ```
      check(MTLTextureUsageRenderTarget & mtlTexture.usage)
      ```
      
      and the process SIGTRAPs on the first paint. On a release Skia the
      assert is compiled out and Metal tolerates the missing flag, so the bug
      is latent there (and CI, which builds against release Skia, never sees
      it). Present since `MetalSwingRedrawer` was added (v0.144.6), unchanged
      on current `master`.
      
      The fix sets the usage bits explicitly — `RenderTarget` because Skia
      renders into the texture, `ShaderRead` because it is then sampled when
      blitted back to `Graphics2D`:
      
      ```objc
      textureDescriptor.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead;
      ```
      
      Repro (stock skiko + the published Debug Skia):
      
      ```
      git clone --depth 1 --branch v0.144.6 https://github.com/JetBrains/skiko.git
      ./gradlew :skiko:publishToMavenLocal -Pskiko.debug=true
      # paint any offscreen SkiaSwingLayer on macOS -> SIGTRAP on first paint
      ```
      
      Validated: `:skiko:awtTest` green; a 2400-frame `SkiaSwingLayer` soak on
      the debug Skia runs leak-free (median frame 2.4 ms, RSS flat) where it
      previously crashed on frame 1. No behavior change on release builds —
      the change is descriptor-time only.
      
      Release Notes - Fixes a crash in offscreen Metal Swing rendering
      (`SkiaSwingLayer`) when running against a Skia build with Metal API
      validation enabled.
      
      Fixes [SKIKO-1144](https://youtrack.jetbrains.com/issue/SKIKO-1144)
      6bcc77c4
  2. 05 Jun, 2026 1 commit
  3. 04 Jun, 2026 1 commit
  4. 02 Jun, 2026 1 commit
  5. 01 Jun, 2026 1 commit
  6. 27 May, 2026 3 commits
  7. 18 May, 2026 2 commits
  8. 04 May, 2026 1 commit
  9. 27 Apr, 2026 1 commit
  10. 24 Apr, 2026 1 commit
    • Bogdan Mitrović's avatar
      Fix PathSegment.hashCode() not handling PathVerb.CLOSE (#1194) · 9b179119
      Bogdan Mitrović authored
      PathSegment.hashCode() threw RuntimeException("Unreachable") for
      PathVerb.CLOSE segments when used in hash-based collections such as
      intersect(). Added CLOSE case consistent with what equals() checks for
      CLOSE segments. Also removed the else branch since all PathVerb values
      are now handled. Added a test which fails unless CLOSE is handled in
      hashCode().
      
      ## Testing
      Ran test on awt locally — the new test `closedPathIntersectTest` fails 
      before the fix and passes after.
      
      ## Release Notes
      Fix crash when using closed paths in hash-based collections such as
      `intersect()`
      
      Fixes: [SKIKO-1038](https://youtrack.jetbrains.com/issue/SKIKO-1038)
      9b179119
  11. 23 Apr, 2026 2 commits
  12. 22 Apr, 2026 1 commit
  13. 17 Apr, 2026 1 commit
  14. 09 Apr, 2026 1 commit
  15. 07 Apr, 2026 1 commit
  16. 24 Mar, 2026 1 commit
  17. 23 Mar, 2026 1 commit
  18. 13 Mar, 2026 1 commit
  19. 06 Mar, 2026 1 commit
  20. 05 Mar, 2026 1 commit
  21. 03 Mar, 2026 1 commit
  22. 02 Mar, 2026 1 commit
  23. 26 Feb, 2026 3 commits
  24. 20 Feb, 2026 1 commit
  25. 19 Feb, 2026 4 commits
  26. 18 Feb, 2026 1 commit
  27. 17 Feb, 2026 3 commits
  28. 16 Feb, 2026 2 commits
    • Victor Kropp's avatar
      replace all remaining links to maven.pkg.jetbrains.space (#1167) · e2f8d173
      Victor Kropp authored
      All public links are updated to
      https://redirector.kotlinlang.org/maven/compose-dev
      Internal buildSrc links to maven directly to avoid unnecessary redirects
      
      Fixes SKIKO-1108
      e2f8d173
    • Ivan Matkov's avatar
      Refactor local Skia build to Gradle/Kotlin (#1163) · 3451c14e
      Ivan Matkov authored
      Previously:
      - The bash script required specifying `SKIA_VERSION` separately from
      `gradle.properties`, leading to version mismatches
      - Script hardcoded `SKIA_TARGET` default to `iosSim`, requiring manual
      override on non-macOS systems
      
      This change:
      - Added `skiaVersionFromEnvOrProperties` property and `printSkiaVersion`
      task. The bash script now queries Gradle for the version instead of
      maintaining its own default.
      - Target platform now defaults to current OS (`hostOs.id`) instead of
      hardcoded `iosSim`.
      - Introduced `BuildLocalSkiaTask` that handles Python build script
      invocation, architecture detection, and validation.
      - Added `SkiaTarget` enum centralizing platform-specific Gradle flags
      and architecture mappings.
      - Simplified bash script: Now focuses solely on git operations
      (clone/checkout skia-pack), delegating all build logic to Gradle.
      
      ### Usage
      ```sh
      # Version from gradle.properties, target auto-detected from OS
      ./build-with-local-skia.sh
      
      # Override either via environment variables
      SKIA_VERSION=m138-80d088a-2 SKIA_TARGET=iosSim ./build-with-local-skia.sh
      
      # Or use Gradle tasks directly
      ./gradlew prepareLocalSkiaBuild -Pskia.target=linux
      ```
      3451c14e