1. 10 Jun, 2026 1 commit
  2. 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
  3. 05 Jun, 2026 1 commit
  4. 04 Jun, 2026 1 commit
  5. 02 Jun, 2026 1 commit
  6. 01 Jun, 2026 1 commit
  7. 27 May, 2026 3 commits
  8. 18 May, 2026 2 commits
  9. 04 May, 2026 1 commit
  10. 27 Apr, 2026 1 commit
  11. 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
  12. 23 Apr, 2026 2 commits
  13. 22 Apr, 2026 1 commit
  14. 17 Apr, 2026 1 commit
  15. 09 Apr, 2026 1 commit
  16. 07 Apr, 2026 1 commit
  17. 24 Mar, 2026 1 commit
  18. 23 Mar, 2026 1 commit
  19. 13 Mar, 2026 1 commit
  20. 06 Mar, 2026 1 commit
  21. 05 Mar, 2026 1 commit
  22. 03 Mar, 2026 1 commit
  23. 02 Mar, 2026 1 commit
  24. 26 Feb, 2026 3 commits
  25. 20 Feb, 2026 1 commit
  26. 19 Feb, 2026 4 commits
  27. 18 Feb, 2026 1 commit
  28. 17 Feb, 2026 3 commits
  29. 16 Feb, 2026 1 commit