JEP submitted: Update Java2D to use the Marlin Renderer as the default Graphics Rasterizer

Laurent Bourgès bourges.laurent at
Tue Sep 1 09:41:00 UTC 2015


>> #6 In the "Alternatives" section, shouldn't we at least mention a GPU
>>> based 2D rendering?
>>> Probably.
>> However, I do not know any RenderingEngine implementation based on GPU
>> yet.
>> I would like to make you aware of Brandon Borkholder's GLG2D project.
> GLG2D is a Graphics2D implementation that uses OpenGL by connecting to the
> GPU using JogAmp JOGL, it implement basic Java2D drawing functionality.
> GLG2D includes a modern shader based GPU implementation for fast rendering
> that work on all platforms that JogAmp JOGL support.
> GLG2D is intended to be used in combination the default renderer inside
> the JDK as a fallback for functionality that is not implemented in GLG2D.
> GLG2D show significant improvement to the CPU based renderers.
It seems promising !

As it provides a custom Graphics2D implementation, it requires the
developper to modify its application code to use GLG2D.

That would be great if GLG2D could implement the RenderingEngine interface
like other renderers (Pisces, Ductus or Marlin).

However it seems cumbersome as GLG2D uses OpenGL to perform the complete
rasterization (triangle to surface compositing & filling) that is performed
in 2 stages by the java2d pipeline: the rendering engines computes pixel
coverage masks (tiles) and software/hardware loops performs the color
compositing & blending onto any Surface (d3d, OpenGL or images).


More information about the jdk9-dev mailing list