1. 05 Jul, 2023 2 commits
  2. 04 Jul, 2023 1 commit
  3. 30 Jun, 2023 2 commits
    • Oleksandr Karpovich's avatar
      Implement hostOs detection for web target (#738) · 52c586f9
      Oleksandr Karpovich authored
      * Implement hostOs detection for web target
      
      * Refactor hostOs initialization in OsArch.js.kt
      
      Instead of using a lazy initialization, this change allows immediate initialization.
      
      * Deprecate incorrect enum OS.JS value in OsArch.kt
      
      Deprecation annotation has been added to JS enum in OsArch. This is done as 'JS' is not a valid host OS name. Added 'Unknown' enum for undefined or unknown cases to handle from now on. Consider using enum 'KotlinBackend' to detect JS.
      
      * Deprecate invalid Arch values and modify hostArch
      
      The Arch values 'JS' and 'WASM' were deprecated as they were found to be invalid. An 'Unknown' value was introduced to accommodate for unforeseen cases in the future. The 'hostArch' value under 'OsArch.js.kt' has been updated accordingly to use this new 'Unknown' value.
      
      * Add OS.Unknown to `when` expressions to make them exhaustive
      52c586f9
    • Nikolai Rykunov's avatar
  4. 29 Jun, 2023 4 commits
  5. 28 Jun, 2023 1 commit
  6. 26 Jun, 2023 4 commits
    • Igor Demin's avatar
      Refactorings from the AWT Font PR (#729) · e3b0ef8d
      Igor Demin authored
      * Refactoring from AWT Font PR
      
      Thanks, @rock3r, for refactorings! I extracted them from the AWT font PR (they were reverted in https://github.com/JetBrains/skiko/pull/639/commits/53f00c7d6be5ac0834ba4b4c3b9b4e3ea5cb0f10)
      
      - fix formatting
      - fix comments
      - split CI steps
      
      I am not sure about mikepenz/action-junit-report. Let's remove it for now (otherwise it should be investigated from functionality and security perspective)
      
      * Refactoring from AWT Font PR
      
      Thanks, @rock3r, for refactorings! I extracted them from the AWT font PR (they were reverted in https://github.com/JetBrains/skiko/pull/639/commits/53f00c7d6be5ac0834ba4b4c3b9b4e3ea5cb0f10)
      
      - fix formatting
      - fix comments
      - split CI steps
      
      I am not sure about mikepenz/action-junit-report. Let's remove it for now (otherwise it should be investigated from functionality and security perspective)
      
      Also, removed implementation("pl.pragmatists:JUnitParams:1.1.1"), as it isn't used.
      e3b0ef8d
    • Ivan Matkov's avatar
    • Ivan Matkov's avatar
      Set framebufferOnly = false (#728) · aa7e1bf7
      Ivan Matkov authored
      aa7e1bf7
    • Sebastiano Poggi's avatar
      Switch AWT font loading to Skia-based (#639) · 8e62cef3
      Sebastiano Poggi authored
      ## Improve font loading and listing
      Available font listing doesn't rely anymore on discovering and loading font files from the disk. This is MUCH faster than the previous solution, which could take seconds on a performant machine. Besides, this greatly reduces memory usage as we're only holding the font family names list in memory, and cache items in memory lazily only once they are requested to speed up later lookups. Users can manually clear the memory cache, and register custom fonts (from files or resources).
      
      We now get the list of available font families directly from Skia, with some additional features such as adding entries for the system font on macOS (which is hidden by default).
      
      To note, the list of fonts available to Skia is not the same as available to AWT, for a number of reasons:
       1. AWT adds logical fonts (e.g., `Dialog`)
       2. AWT silently substitutes broken fonts
       3. AWT lists the macOS system font, but under a weird name, `.AppleSystemUIFont`, whereas Skia doesn't
       4. AWT and Skia don't use the same logic to list installed fonts on all platforms
       5. AWT includes fonts embedded into the JVM automatically
      
      This makes things a bit more complicated, but if you _know_ the correct family name, everything works fine. While AWT silently substitutes invalid font family names with others, Skia will return `null` if it can't find a font. We follow the Skia approach, returning null if we can't match a font family name.
      
      ## Improve AWT `Font` conversion to Skiko `Typeface`
      On the JetBrains Runtime, the `Font.toSkikoTypefaceOrNull()` will be able to properly match an AWT `Font` to a Skiko `Typeface`, even on OSes other than macOS. If running on other JVMs, this returns `null`, as requested by @igordmn. This requirement is documented in the KDocs.
      
      The necessity to be on the JBR is due to the "regular" AWT implementations of `sun.font.Font2D` and `sun.funt.TrueTypeFont` being essentially broken: they read the wrong entry from the `name` table in TrueType fonts and use it as font family name. In the JBR, additional logic has been added to read the correct entry, the [_preferred family_](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html), and we can use this information to match with Skia font families, as Skia uses the correct _preferred family name_.
      8e62cef3
  7. 20 Jun, 2023 2 commits
  8. 05 Jun, 2023 2 commits
  9. 30 May, 2023 1 commit
  10. 26 May, 2023 1 commit
    • Elijah Semyonov's avatar
      iOS frames scheduling fix (#714) · 81f1a7ab
      Elijah Semyonov authored
      * Make rundown rendering bandaid(or not) fix to avoid incorrect scheduling problem
      
      * Remove unneeded counter check.
      
      * Extract magic value. Document it.
      
      * Remove bandaid.
      
      * Make right scheduling.
      
      * Fix for path on double-dispatch during vsync-frame.
      
      * Change logging a bit.
      
      * Update doc
      
      * Update doc
      
      * Add comment on touchesCount, rephrase the body.
      
      * Replace control flow with `also`
      
      * Remove debug logs.
      
      * Refactor 2 booleans into single enum.
      
      * Simplify enum
      
      * Replace Unit with empty body in `when` expressions.
      
      * Replace comment style in function scopes.
      
      * Make DrawSchedulingState private.
      
      * Change comment style on private property.
      
      * Add rationale behind drawSchedulingState initial value.
      81f1a7ab
  11. 17 May, 2023 2 commits
  12. 16 May, 2023 2 commits
  13. 10 May, 2023 2 commits
  14. 04 May, 2023 1 commit
    • Nikolai Rykunov's avatar
      Refactor awt metal code and provide some basic docs (#699) · a17f4ed0
      Nikolai Rykunov authored
      * [awt.metal] Extract MetalDevice interface into .h file
      
      * [awt.metal] Move context and renderTarget creation to ContextHandler
      
      ContextHandler shouldn't depend on redrawer, since redrawer depends on ContextHandler
      
      * [awt.metal] Use value class to hold MetalDevice pointer
      
      * [awt.metal] Add docs for MetalDevice
      
      * [awt.metal] Add simple docs for MetalRedrawer and MetalContextHandler
      
      * [awt.metal] Use null instead of artificial pointer to 0
      
      ---------
      Co-authored-by: 's avatarIvan Matkov <ivan.matkov@jetbrains.com>
      a17f4ed0
  15. 28 Apr, 2023 1 commit
  16. 21 Apr, 2023 1 commit
  17. 20 Apr, 2023 2 commits
  18. 19 Apr, 2023 2 commits
  19. 18 Apr, 2023 3 commits
  20. 11 Apr, 2023 1 commit
  21. 04 Apr, 2023 1 commit
  22. 29 Mar, 2023 2 commits
    • Igor Demin's avatar
      Implement multitouch (#681) · e825dd01
      Igor Demin authored
      1. Remove SkikoTouchEvent, we send all pointer events as SkikoPointerEvent now.
      
      2. Add SkikoPointerEvent.Pointer that represents a separate touch/mouse
      
      3. Implement multitouch for iOS/Android
      e825dd01
    • Pavel's avatar
      Add configurable logger, solidify workaround for JBR-5274 (#683) · ea760f80
      Pavel authored
      * sometimes when we change scale via `EasyRes` or when we close/open lid and window is migrated to other screen `paint` is not called
      
      see FL-18544
      
      * customizable logger behaviour
      
      * add debug logs in AWT layer
      ea760f80