Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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`.
- Loading branch information