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

Use FFM instead of Unsafe for Java 2D RenderBuffer class

XMLWordPrintable

    • 2d
    • b11

      The Java 2D accelerated pipelines [OpenGL, Metal, D3D] use a shared class sun.java2d.pipe.RenderBuffer to store instructions for the pipelines.
      This uses Unsafe to allocate a native buffer and uses put[Int | Long | Float | etc ] and copyMemory methods to store the instructions, which on demand are flushed to the native pipeline.

      This usage maps very well to creating an FFM MemorySegment and using set() and copy() methods and removes one more usage of the java.base internals.

            prr Philip Race
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: