remove obsolete full-row-repaint debug toggle; document diagnostics

The fullRowRepaint toggle existed only to bisect the black-bar repaint artifact,
which is now fixed, so drop it. Document the two remaining render-debug flags
(profile, debugRepaint) in the README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 22:31:50 +02:00
parent 93d53fcef6
commit cc9ac43ffa
2 changed files with 19 additions and 10 deletions

View File

@@ -132,3 +132,22 @@ open_scrollback = "ALT+S"
Each tab has its own stack of tiled and floating panes; only the active tab is rendered. A Each tab has its own stack of tiled and floating panes; only the active tab is rendered. A
thin tab bar appears at the top when more than one tab is open. Closing the last tiled pane thin tab bar appears at the top when more than one tab is open. Closing the last tiled pane
while floating panes exist promotes the most recently active floating pane to a tiled pane. while floating panes exist promotes the most recently active floating pane to a tiled pane.
## Diagnostics
Two render-debugging flags are off by default and add no overhead unless enabled. Pass them
as JVM system properties (each also has an environment-variable equivalent). With the
packaged binary the JVM picks them up from `JDK_JAVA_OPTIONS`:
```sh
JDK_JAVA_OPTIONS="-Djprototerm.profile=true" ./result/bin/jprototerm
```
- `-Djprototerm.profile=true` (or `JPROTOTERM_PROFILE=1`): print a `[render-profile]` line to
stderr every N renders with the per-frame cost of each render stage — `snapshot` (terminal
state marshalling), `fingerprint` (change detection), `draw` (canvas painting), and the
`frame-total`. Set `-Djprototerm.profile.frames=<N>` to change the dump interval (default
120).
- `-Djprototerm.debugRepaint=true` (or `JPROTOTERM_DEBUG_REPAINT=1`): paint each per-column
repaint run's cleared span red instead of clearing it. Repainted regions flash red, so you
can see exactly which cells are being redrawn each frame.

View File

@@ -44,12 +44,6 @@ final class TerminalPaneNode extends Region {
private static final int DIRTY_PARTIAL = 1; private static final int DIRTY_PARTIAL = 1;
private static final int DIRTY_FULL = 2; private static final int DIRTY_FULL = 2;
// Debug toggle: when set, skip the per-column repaint and always repaint the whole row.
// Used to bisect partial-repaint artifacts (stale black bars near the cursor).
private static final boolean FULL_ROW_REPAINT =
Boolean.getBoolean("jprototerm.fullRowRepaint")
|| "1".equals(System.getenv("JPROTOTERM_FULL_ROW_REPAINT"));
// Debug toggle: paint each repaint run's cleared span red instead of clearing it to // Debug toggle: paint each repaint run's cleared span red instead of clearing it to
// transparent. If the black bars turn red, they are spans repaintColumns clears but never // transparent. If the black bars turn red, they are spans repaintColumns clears but never
// refills; if they stay black, those pixels are never touched by repaintColumns at all. // refills; if they stay black, those pixels are never touched by repaintColumns at all.
@@ -747,10 +741,6 @@ final class TerminalPaneNode extends Region {
} }
private void renderChanged(RenderRow row) { private void renderChanged(RenderRow row) {
if (FULL_ROW_REPAINT) {
render(row);
return;
}
double oldWidth = canvas.getWidth(); double oldWidth = canvas.getWidth();
double oldHeight = canvas.getHeight(); double oldHeight = canvas.getHeight();
prepareCanvas(row); prepareCanvas(row);