Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8359260

Optimizations for Marlin FFM in JavaFX

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx25
    • javafx
    • None

      During the review of the Unsafe --> FFM conversion in JavaFX a few potential optimizations were noted. Specifically:

      1. Optimize alpha map creation:
      I guess this is only done once, but following multiple layers of calculation I think this array defaults to 64K long, in which case a bulk copy would be better, but it is perhaps out-of-scope for a 1:1 replacement

      https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/lang/foreign/MemorySegment.html#copy(java.lang.Object,int,java.lang.foreign.MemorySegment,java.lang.foreign.ValueLayout,long,int)

      2. Unneeded reference to ALPHA_MAP and ALPHA_MAP_AA arrays
      MaskMarlinAlphaConsumer.java L110: is ALPHA_MAP needed to keep the parent reference in OffHeapArray? if so, why not use a single Object instead of an array?

            lbourges Laurent Bourgès
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: