Skip to content

2026.11.05

Latest

Choose a tag to compare

@Valkryst Valkryst released this 06 Nov 16:55
· 15 commits to master since this release

New Features

Native macOS full-screen support

VFrame.setFullScreen now opts windows into macOS's native full-screen mode via reflective com.apple.eawt.FullScreenUtilities, enabling the system green title-bar button and the Ctrl-Cmd-F shortcut. No new dependency required; no-ops silently on non-macOS JVMs.


Bug Fixes

  • Multi-monitor full-screen sizing (VFrame).
    setFullScreen previously sized the frame to the primary display via Toolkit.getDefaultToolkit().getScreenSize(), which is wrong when the frame lives on a secondary or HiDPI display. Each display now uses its own GraphicsConfiguration bounds.

  • VolatileImage lifecycle, HiDPI, and multi-monitor glyph rendering.
    The glyph cache previously stored a single VolatileImage per key, created against the default screen's GraphicsConfiguration and refreshed only on contentsLost(). Windows on non-default monitors (or HiDPI displays with a different scale) received images sized for the wrong device, producing blurry or incorrectly scaled glyphs; validate() was never called, so IMAGE_INCOMPATIBLE transitions were silently ignored; and on restore/loss the entry was invalidated and re-rendered from scratch. The cache now stores a GlyphEntry pairing an immutable BufferedImage source with an optional VolatileImage tied to a specific GraphicsConfiguration; the accelerated image is validated against the caller's GC on every lookup, recreated on IMAGE_INCOMPATIBLE or GC mismatch, and redrawn cheaply from the cached source on IMAGE_RESTORED / contentsLost.

  • White-tile rendering on hardware-accelerated paths.
    High-quality rendering hints trigger a hardware-accelerated path that does not initialize VolatileImage pixel memory. Switched the copy to AlphaComposite.Src so uninitialized (opaque white) pixels are overwritten where the source is transparent, resolving tiles appearing as solid white.

  • Paint method concurrency.
    Dropped synchronized from VCheckBoxUI.paint and VRadioButtonUI.paint — Swing painting runs exclusively on the EDT, so the monitor acquisition was dead weight. Marked VTerminalLookAndFeel.highQualityRenderingDefault volatile so writes from a non-EDT setter are visible to EDT paint reads without relying on incidental happens-before ordering.

  • Test assertions for newer JDK rendering hints.
    BufferedImage.getGraphics() on newer JDKs returns a Graphics2D with VALUE_ANTIALIAS_OFF already set rather than null. The affected assertions now check that VALUE_ANTIALIAS_ON is not set, rather than asserting the hint is null.


Performance

Zero per-paint allocations in the glyph render hot path.

  • FontMetrics is now cached once in the VFont constructor instead of rebuilding a 1x1 BufferedImage + Graphics2D on every glyph render.
  • Added a memoized VColor.opaque() so VPanel.paintComponent no longer allocates two throwaway Color objects per tile per paint when the panel is opaque.