Skip to content

Version 0.8.17

Compare
Choose a tag to compare
@jb-compose-bot jb-compose-bot released this 24 Oct 17:25
bbfaf62
Reuse the BufferedImage in SwingOffscreenRenderer (#996)

Fix for
https://youtrack.jetbrains.com/issue/CMP-6722/Excessive-garbage-generation-from-redrawing

Previously, the `draw` method would allocate a `BufferedImage` on every
redraw, which is wasteful. This fix changed `SwingOffscreenRenderer` to
reuse the same instance of `BufferedImage` and only clear it on redraws.
Only changing the draw size would allocate a new `BufferedImage`.