diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 14:27:58 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 14:27:58 +0300 |
| commit | 5ab6b560e8528c27ba934b90f94b1828b7771e27 (patch) | |
| tree | 409c2a2e864529ccda0ff3e3b75b0280279e2a33 /src/screen.h | |
| parent | 7633ab2c60b40bd5aa67ef391b2a0d149685742f (diff) | |
Encapsulate stream queue context and consolidate forwarding wrappers
- Create struct stream_emit_ctx packing stream queue arguments into 1 cache line
- Reduce emit_stream_bulk_wrapped from 13 parameters to 3
- Reduce flush_stream_queue from 10 parameters to 1
- Extract stream_queue_finish to eliminate duplicated cleanup in kernel instantiations
- Replace EMIT_STREAM_ROW macros with typed inline functions
- Move pending_wrap clearing directly into term_screen_erase, insert, delete, and scroll
- Remove sc_erase_display, sc_erase_line, sc_insert_chars, and sc_delete_chars wrappers
- Consolidate term_row and remove duplicated row_fill_gap helper
Diffstat (limited to 'src/screen.h')
| -rw-r--r-- | src/screen.h | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/screen.h b/src/screen.h index 50e18c6..8498e9d 100644 --- a/src/screen.h +++ b/src/screen.h @@ -161,15 +161,7 @@ static inline struct srow *screen_row_at(const struct screen *s, int y) static inline struct srow *term_row(const struct term *t, int y) { - int p = t->scr.top + y; - struct srow *row = &t->scr.slot[p >= t->scr.rows ? p - t->scr.rows : p]; - srow_materialize_text(row); - return row; -} - -static inline struct srow *term_screen_row(const struct term *t, int y) -{ - return term_row(t, y); + return screen_get_row(&t->scr, y); } /* Write the cells of a text row to out: its text, then its fill blanks. @@ -361,17 +353,6 @@ static inline void mark_row_blank(struct term *t, int p, uint32_t fg, uint32_t b (void)bg; } -static inline void row_fill_gap(struct term *t, int p, struct cell *row, int x) -{ - struct screen *s = term_active_screen(t); - struct srow *r = &s->slot[p]; - if (x > r->len) { - if (!(r->flags & RF_TAIL_PADDED)) - fill_cells(row + r->len, x - r->len, TERM_COLOR_FG, TERM_COLOR_BG); - r->len = (uint16_t)x; - } -} - static inline void term_row_fill_gap(struct srow *row, int x) { if (x > row->len) { @@ -413,7 +394,7 @@ static inline void erase_span(struct term *t, int p, int from, int to) row_set_wrapped(row, false); if (!pristine) { - row_fill_gap(t, p, cells, from); + term_row_fill_gap(row, from); fill_cells(cells + from, to - from, t->cur_fg, t->cur_bg); if (to > len) { row->len = (uint16_t)to; |
