Commit Graph

109 Commits

Author SHA1 Message Date
3c913fefd3 fix black seam bars: opaque base fill instead of clearRect
The persistent black bars in the partial-repaint path were clearRect leaving
the run's fractional edge pixels transparent, which showed the near-black pane
background as a seam against the adjacent un-repainted line. Confirmed with the
debugRepaint toggle: filling the span opaque removed the bars entirely.

Fill the repaint run with PANE_BACKGROUND (the default cell background) instead
of clearing to transparent; per-cell backgrounds paint over it as before. Safe
because the per-column path never runs while kitty graphics are present (those
force a full render), so no below-text image needs a transparent row canvas.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 22:08:57 +02:00
263bcf36b7 add debugRepaint toggle that fills cleared spans red
Diagnostic for the persistent black bars: fills each repaint run's cleared span
red instead of clearing to transparent. If the bars turn red they are spans
repaintColumns clears but never refills; if they stay black those pixels are
never touched by the per-column repaint and the cause is elsewhere.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 22:02:41 +02:00
8e060b27ca Revert "snap repaint clear/fill to integer pixels to kill seam bars"
This reverts commit 6613f1f746.
2026-05-31 21:58:15 +02:00
6613f1f746 snap repaint clear/fill to integer pixels to kill seam bars
cellWidth is fractional, so in repaintColumns the clearRect cleared a run's
edge pixel to full transparency while the background fillRect covered that same
pixel only partially (antialiased), leaving a ~1px part-transparent column that
showed the near-black pane background as a thin bar 1-2 cells before the cursor.
Full-row repaint hid it because the highlighted line is then one contiguous
fill with no internal junction.

Route the clear and the background fills through a shared columnX() that rounds
each column boundary to a whole device pixel, so run edges land on integer
pixels with full single coverage and adjacent runs tile seamlessly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:56:01 +02:00
5728733f5f worktrees ignores 2026-05-31 21:52:39 +02:00
6e3e88919e Revert "fix glyph-overhang artifacts in partial row repaint"
This reverts commit 57103bb98b.
2026-05-31 21:50:17 +02:00
57103bb98b fix glyph-overhang artifacts in partial row repaint
repaintColumns cleared and redrew only [start,end], but a neighbouring cell's
glyph can overhang into that span. The clearRect erased the overhang and the
neighbour was never redrawn, leaving black notches through the line 1-2 cells
before the cursor that survived until a full rerender.

Redraw text for a couple of extra cells on each side, clipped to the cleared
span, so overhang from just-outside cells is restored without touching their
own cell areas. Keeps the per-column repaint efficiency (vs the full-row
repaint debug toggle, which fixed the bars but repainted every dirty cell).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:48:34 +02:00
cb95a7188d update jlibghostty 2026-05-31 21:39:18 +02:00
Gregor Lohaus
5ca192b7be add full-row-repaint debug toggle
-Djprototerm.fullRowRepaint=true (or JPROTOTERM_FULL_ROW_REPAINT=1) bypasses the
per-column repaint in renderChanged and repaints the whole row, to bisect the
stale black-bar artifact that appears near the cursor and survives until a full
rerender.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:25:13 +02:00
Gregor Lohaus
e99a6ee33e split snapshot profiler bucket into update vs marshal
The snapshot bucket lumped ghostty's native dirty-state update together with
the Java-side cell marshaling. Time them separately to see which half of the
~7ms/frame snapshot cost (now the dominant frame cost after the detectShift
hoist) is the real target.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:18:07 +02:00
Gregor Lohaus
4923ea5527 hoist row hash out of detectShift delta scan
rowFingerprint(row) is invariant across the delta loop but was recomputed for
every candidate delta, making shift detection O(rows^2 x cols) on large changes
(full-screen scroll). Precompute each changed row's hash once, dropping it to
O(rows x cols). Profiling showed fingerprint hashing at ~74% of frame time under
heavy scroll, dominated by this loop.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:09:54 +02:00
Gregor Lohaus
1f7394d75a add opt-in render profiler instrumentation
Gated behind -Djprototerm.profile=true (or JPROTOTERM_PROFILE=1), accumulates
per-frame nanos into snapshot/fingerprint/draw/frame-total buckets and dumps
to stderr every N renders. Splits the three suspected render costs: native
snapshot marshaling, fingerprint hashing, and canvas draw recording.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:04:00 +02:00
Gregor Lohaus
50641d0a6a per-row cell-run repaint 2026-05-31 20:12:43 +02:00
Gregor Lohaus
51f64e7ca8 cache hidden panes 2026-05-31 19:56:09 +02:00
Gregor Lohaus
528afafcda no next floating pane keyboard shortcut 2026-05-31 19:52:24 +02:00
Gregor Lohaus
093a09da39 frame classifiaction not needed anymore 2026-05-31 19:46:55 +02:00
Gregor Lohaus
59ab33bc01 dont rerender full on every layout frame 2026-05-31 19:45:38 +02:00
Gregor Lohaus
d8447d9e29 port feasable performance improvements 2026-05-31 19:38:06 +02:00
Gregor Lohaus
dba6474491 apply race condition fix 2026-05-31 19:30:36 +02:00
Gregor Lohaus
743f312921 move unchanged rows 2026-05-31 18:55:53 +02:00
Gregor Lohaus
3054b3ec77 cleanup 2026-05-31 18:51:16 +02:00
Gregor Lohaus
2bcaf951df Render terminal rows as JavaFX nodes 2026-05-31 18:40:33 +02:00
Gregor Lohaus
beba14c3ea scene graph 2026-05-31 18:27:52 +02:00
Gregor Lohaus
f5562baf5f Merge branch 'refactor' 2026-05-31 16:27:21 +02:00
Gregor Lohaus
3017b99f87 recover pane 2026-05-31 16:24:43 +02:00
Gregor Lohaus
0958c93b4f recover tab 2026-05-31 16:23:36 +02:00
Gregor Lohaus
9c98d87783 recover abstract terminal renderer 2026-05-31 16:21:38 +02:00
Gregor Lohaus
76c731578f recover terminal metrics from helix buffer 2026-05-31 16:20:43 +02:00
Gregor Lohaus
95619f5b4c fuck did bad git reset hard to main, recovering from helix buffer 2026-05-31 16:19:37 +02:00
Gregor Lohaus
174cfc00d3 what is happening ?? 2026-05-31 16:15:37 +02:00
Gregor Lohaus
29e84c9830 remove unused old classes 2026-05-31 16:13:40 +02:00
Gregor Lohaus
a7baa08e68 add bin to gitignore 2026-05-31 15:45:55 +02:00
Gregor Lohaus
76f539d34a fix build error 2026-05-30 01:27:10 +02:00
Gregor Lohaus
ba884cd0a2 probably wrong fix 2026-05-30 01:23:16 +02:00
Gregor Lohaus
7dbbf89b27 non fix of clearing issue 2026-05-30 01:13:53 +02:00
Gregor Lohaus
e2850f067e readme update 2026-05-29 22:10:36 +02:00
Gregor Lohaus
022cf22463 tabbar, background coloring 2026-05-29 22:08:05 +02:00
Gregor Lohaus
250b182060 tabs 2026-05-29 21:41:25 +02:00
Gregor Lohaus
ebba6cc44f main pane splitting 2026-05-29 21:27:17 +02:00
Gregor Lohaus
4c3449129c no image caching, no transparency for performance 2026-05-29 21:18:16 +02:00
Gregor Lohaus
40d6287867 inverse bg 2026-05-29 20:37:16 +02:00
Gregor Lohaus
ff21bf3544 incremental render 2026-05-29 19:50:09 +02:00
Gregor Lohaus
c03d9245d0 remove .gradle 2026-05-29 13:01:11 +02:00
Gregor Lohaus
0915c649bd ignore .gradle 2026-05-29 13:00:19 +02:00
Gregor Lohaus
4a06a89400 update readme 2026-05-29 12:58:23 +02:00
Gregor Lohaus
4de2d31e91 clear env, dont inherit nix wrapper env 2026-05-29 12:51:45 +02:00
Gregor Lohaus
b98a18b49f f native image, just build a jar 2026-05-29 12:33:32 +02:00
Gregor Lohaus
08ad025f76 get rid of pty4j 2026-05-29 11:06:46 +02:00
Gregor Lohaus
c9fb8b5f0a pty4j meta 2026-05-29 10:43:04 +02:00
Gregor Lohaus
3b26a8d12c pty4j meta 2026-05-29 10:40:03 +02:00