• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. Lanai
  4. Work In Progress

Page History

Versions Compared

Old Version 22

changes.mady.by.user Vitaly Provodin

Saved on Apr 13, 2020

compared with

New Version 23

changes.mady.by.user Ajit Ghaisas

Saved on Sep 04, 2020

  • Previous Change: Difference between versions 21 and 22
  • Next Change: Difference between versions 23 and 24
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Work done so far :

A working prototype of basic feature-set with Java 2D Metal rendering pipeline has been implemented for - 

  1. 2D Primitives rendering
    1. implemented AA rendering for some primitives and painting types
    2. optimised geometry handling (no unnecessary MTLBuffer creation)
    3. improved stability: fixed some severe memory management problems in primitive handling
  2. Multisampling (hardware accelerated) AA
    1. investigated multisampling AA rendering
    2. implemented AA parallelogram rendering via multisampling AA
  3. Image rendering. 
    1. improved stability: fixed several memory management problems
    2. native blit operations (Blit, IsoBlit) for almost all blit primitives (of MTLBlitLoops)
    3. all 32bpp raster formats with ‘opaque’ flags
    4. all alpha-composite modes (still unsupported extra-alpha)
    5. clipping, transform
    6. textures pool (to avoid reallocations for temporary textures) with restricted size (cleaned with LRU-strategy)
      1. fast search in pool
      2. no unnecessary sync
      3. blit without sampling if possible
    7. supported all parameters of blit operations

  4. General metal pipeline workflow
    1.  fixed resources leaks, added minor optimizations (in PipelineStateStorage and TexPool)

    2. refactored MTLContext (splited into several classes)

    3.  fixed issues connected with changes of pipelineState

    4.  added minor optimizations (don’t change state when possible)

  5. Grayscale Text Rendering - Feature completion of Grayscale text rendering without cache under JDK-8225174
  6. Initial implementation of Grayscale text rendering with cache under JDK-8237608
  7. Closure of main performance bottleneck task JDK-8228573 after implementing proper back/front buffer drawing under JDK-8233190

  8. JDK-8233233 - Implement Shape Clip (for aliased rendering)

Functional implementation of basic building blocks of the rendering pipeline is almost complete.

  1. Rendering 2D geometrical primitives
  2. Text Rendering
  3. Image Rendering

There are bugs identified and logged. Please refer -  https://bugsIt is available in the lanai repo https://hg.openjdk.java.net/lanai/lanai/It can be tested with J2DDemo (available at - src/demo/share/jfc/J2Ddemo) that shows working / partially working / not-working Java 2D features with Metal rendering as compared with OpenGL rendering.
VM option -Dsun.java2d.metal=True needs to be passed in to switch rendering pipeline to Metal.
Also, antialiasing needs to be turned off (which is on by default in J2DDemo)issues/?filter=37832

Work in Progress :

Current focus area is - Rendering performance evaluation :
As basic blocks of rendering have been implemented, it is a good time to check on rendering performance to evaluate how Metal rendering in Java 2D fares as compared to OpenGL rendering in Java 2D. As a first step, we are using below test benchmarkings - 

  1. RenderPerfTest (available at - src/demo/share/java2d/RenderPerfTest)
    1. implemented AA benchmarks
  2. J2DBench Tests (available at - src/demo/share/java2d/J2DBench) for drawing 2D primitives - line, rectangle, filled rectangle, ellipse, filled ellipse.

...

We have identified bugs that are critical for JEP integration and working on them.

Please refer - https://bugs.openjdk.java.net/issues/?filter=39210 for a list of critical bugs

  1. Reducing number of MTLRenderEncoders that get created per render pass
  2. Reducing the number of drawPrimitives calls by batching data whenever possible
  3. Using setNeedsDisplay flag of MTLLayer and updating the layer content on AppKit thread in a callback
  4. Use multisampling AA for AA primitive rendering

The scores of performance metrics for Java 2D Metal rendering are placed at the performance charts

...

The three main areas of implementation and there status is -

  1. Rendering 2D geometrical primitives : Almost complete.
  2. Text Rendering : Grayscale Text rendering is complete. LCD text rendering is partially complete.
  3. Image Rendering : Basic image rendering is complete. There are tasks in progress to implement image source types and different blit operations.

After most of the rendering implementations are done, our goal is to stabilize the build and work towards EA release.

Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.23
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 302, "requestCorrelationId": "3216ffcc17392950"}