Java2D rendering primitives can be logged using the following Java VM property

See oracle docs describing the particular options.
This logging has been extended in JetBrains runtime for better tracking performance problems in IDEA platform-based products.
The extended version looks like this:
    -Dsun.java2d.trace=[log[,timestamp]],[count],[ptime],[name:<substr pattern>],[out:<filename>],[td=<threshold>],[help],[verbose]

Also, the logging now tracks some pure native routines such as working with LCD glyph cache. Here is an example