Commit Graph

759 Commits (ce3e5d112eab920f14c719ceb5d2862b65d69786)

Author SHA1 Message Date
nick black b2dcc7cdf2 demo: push delaymult through to ncvisuals 5 years ago
nick black 0f435240d6 xray: scroll twice as quickly 5 years ago
nick black 7295377db7 panelreeldemo: don't block on input 5 years ago
nick black aba9a4f967 Eliminate fprintf() for ~20% FPS boost #277
Profiling with `perf` revealed the fprintf() inside term_esc_rgb()
to dominate our performance. Replace it with a u8->str lookup table
and a hand-assembled string fed into a single fputs(). On a 80x70
xfce4-terminal geometry, this wins 20%+ FPS on the demo, w00t!

Huzzah for profiling!
5 years ago
nick black 19c2d7d6df demo: export delaymultiplier 5 years ago
nick black 785ef20937 view: legend visible on 80x24 5 years ago
nick black afcd265253 handle 10^4 FPS in summary table :) 5 years ago
nick black b8f25ff89b Map 8-bit ffmpeg α to 2-bit notcurses α #276 5 years ago
nick black f857edd09d libav: render spaces when possible 5 years ago
nick black 17df279b66 libnotcurses-sys rust lowlevel bindings 5 years ago
nick black 5cf8b8327a demo: don't overcount time in summary table 5 years ago
nick black 3011a59cbd don't call ncplane_dim_yx() in notcurses_render_internal 5 years ago
nick black 385d37ac8c painter: drop loop at end, nice FPS gain 5 years ago
nick black 1c17b05434
allow rtl uniblocks 5 years ago
nick black c8f12b6412
uniblock: darken the area above the block 5 years ago
nick black 631c684a88
cut view demo runtime by 1/3 5 years ago
nick black adf808110d
convert remaining man1 pages to pandoc 5 years ago
nick black a419e866fe
witherworms: color/timing tweaks 5 years ago
nick black 5f58ef3a4d
implement ncvisual timescaling #275 5 years ago
nick black dd7f8eff4b
ncvisual_stream: add timescale param 5 years ago
nick black 347f85150f
witherworms: just lighten head #272 5 years ago
Nick Black 7ec022d067
Painter's algorithm #255 (#274)
* notcursesI.avi 30 -> 60fps
* painter's algorithm works #255
5 years ago
nick black 7c687faea0
pulsing text + unit test + docs #163 5 years ago
nick black 13c2dc9841
fade: propagate fader return value 5 years ago
nick black 56a54b5441
break apart render/rasterize #155 5 years ago
nick black 1b83c8b182
uniblock: drop rtl blocks for now #183 #259 5 years ago
nick black 49d684c772
render: always restore char when recovering 5 years ago
nick black 2ebc3e2bfe blend: conditionally blend in alpha 5 years ago
nick black f280db744d panelreeldemo: support abort/fail 5 years ago
nick black 6508135667 witherworm: enable mathtext 5 years ago
nick black 3faffaa847 channels_blend() : don't blend in wide status #260 5 years ago
nick black 38fb082c61 pthread_cond_timedwait() requires CLOCK_REALTIME :/ 5 years ago
nick black f8c870bb76 demo: reject multiplier <= 0 5 years ago
nick black 9b62958bd0 witherworm: support abort v failed 5 years ago
nick black a120e40816 panelreel-demo: support abort vs fail 5 years ago
nick black 6a7d7a750c xray: support abort vs failed 5 years ago
nick black 8b4de3f482 add internal cell_debug() 5 years ago
nick black 0f60af347d add clipped set functions 5 years ago
nick black c4ee0acff0 demo: support aborted vs failed 5 years ago
nick black 5742c7396c viewdemo: support abort vs failed 5 years ago
nick black 4f629cc5b3 lighting kick! 5 years ago
nick black b1995190c4 don't be an asshole 5 years ago
nick black b8e11e5ef4 poc mathtext works now #260 5 years ago
nick black f36431bc19 render: inherit wide mask on assignment #260 5 years ago
nick black 3ee48a8233 vfprintf: need a va_copy() 5 years ago
nick black dc2f788d28 summary: match rounding #268 5 years ago
nick black 7895d06273 cursor_move(-1,-1) while invalid is invalid #270 5 years ago
nick black fc039b034e notcurses-demo: implement -r option 5 years ago
nick black 00e6ecac7d fade: avoid divide by zero on empty plane #269 5 years ago
nick black 602b34bc0c mathtext: full strings #260 5 years ago
nick black abc17d37aa ncplane_vprintf_prep: reprint after realloc #260 5 years ago
nick black d055faed9a add mathtext PoC #260 5 years ago
nick black 7d598a5033
demo: add -p to usage() 5 years ago
nick black 1be4025289
CMake: true fix for #208, use NOTCURSES_SHARE 5 years ago
nick black ebbac42bf6
whoomp, there it is: fix all libav timing issues #159 5 years ago
nick black 306045116f API: always call complex from static simple 5 years ago
nick black d8c6e2434a
demo: summary table adds render% 5 years ago
nick black f092e62bca
demo summary: total out columns 5 years ago
nick black a56846468e
notcurses-view: keypress skips, not aborts 5 years ago
nick black acef43c759
avcodec_parameters_to_context() #215 5 years ago
nick black 75f0ea6ca0
HUD: print framecount 5 years ago
nick black 9677114e45
notcurses-view: support -l 5 years ago
nick black f4cda62d63
uniblock: don't emit useless \u200e 5 years ago
nick black 309211e308
enmetric() for small values #256 5 years ago
nick black 14d7bed6db
notcurses-input: fix banner display #263 5 years ago
nick black b37ea582a3
enmetric()ize total time output in demo summary 5 years ago
nick black c00fc3c3f7
mask out SIGWINCH in demo #262 5 years ago
nick black 7e59cf1053
don't print Term line with suppress_banner 5 years ago
nick black 24ba1c4425
grid: fix error on superlarge geometries 5 years ago
nick black a170e4334a
cmake: write install prefix #208 5 years ago
nick black c8148fe949
xray: don't blend banner 5 years ago
nick black 3d02318e29
panelreel-demo: hook up pipe 5 years ago
nick black 1a2cccaa18 fold out ncplane_move_cursor_yx() wherever possible #257 5 years ago
nick black 7016e7f5da summary: clean up table's unicode BDC 5 years ago
nick black 6cb945f3d5 panelreel: initial tablet count based on height 5 years ago
nick black 930968f31a
demo: add legend to summary table #258 5 years ago
nick black 07c175b320
refrain from using undefined terminfo capabilities #252 5 years ago
nick black 9c8ce83f95
chunli/view: trans out 5 years ago
nick black 54fb468dfe chunli: use demo_render() 5 years ago
Nick Black f5c6297902
Chun Li demo (#251)
* chun li demo
* ncvisual_decode: allow multiple renders of the same frame
* add -H to notcurses-demo man page
* update section 1 man page versions
5 years ago
nick black a748dea61b uniblock: restore colors/fade 5 years ago
nick black 5dd90f3735 add ncplane_dim_[yx] quick accessors 5 years ago
Nick Black f6975d11d5
Docs/API sweep for 1.0.0 #244 #249 (#250)
* sync up some docs #244
* sync README and man page
* notcurses_output() man page work
* pull attr/channels from output functions #244
* witherworm: clean up explicit moves #244
* still more man page work
* notcurses_lines, last of the man pages i think
* panelreel man page #244
* debian: ruby-ronn->pandoc
* debian: full multiarch compliance
* debian: symbols file
* pandoc: fix syntax for lexgrog
* fm6.mkv: strip audio
* pandoc: fix up apropos man syntax #249
* ncurses_lines man page
5 years ago
nick black a868a29c24
notcurses-view: support resizes post-render 5 years ago
nick black 03636b14d3
maxcolor -> trans, document loglevels 5 years ago
nick black 781a0eda44 clean up input thread in demo #246 5 years ago
nick black bd27e056e7 don't ncvisual_decode+stream #246 5 years ago
nick black c7558550f4 drop sprite-enhalfen 5 years ago
nick black 0de1856e38 accept a loglevel for libav 5 years ago
nick black 6518e2f888 xray: free up path accessor 5 years ago
nick black 867a0db3e9 witherworms: rewrite with ncplane_at_yx() 5 years ago
nick black b1c16cd437
more space between instances than letters, ick 5 years ago
nick black 029142e2c2
grid demo: actually do something now 5 years ago
nick black 44da49d351
ncvisual: free up the oframe #241 5 years ago
nick black e05ec51629
ncvisual: fix the major memory leak in streaming #241 5 years ago
nick black bc1f9bfb43
ncvisual: free up image alloc #241 5 years ago
nick black 9fdee8f672
xray: kill obsolete FIXME and static 5 years ago
Nick Black 2fbc94e41c
Higher planes obliterate bisected wide glyphs #158 (#243)
* higher planes stomp wide glyphs
* broken unit test
* develop out widestomp PoC
* fix notcurses_at_yx()
* fix up dig_visible_cell() return value
* refuse wide glyph on last column #242
* set adjacent cell wide when rendering #158
* xray: eliminate weird color flicker
* witherworm: don't eat wide glyphs
* unit test for boxed glyph
* uniblock: no need to emit so many U+200Es
* witherworm: remove wide glyph hack
5 years ago
nick black 48177b8474
implement notcurses_at_yx() 5 years ago
nick black 35aa7f6e85
move cell_egc_copy() to internal.h 5 years ago
nick black bdcea181a2
don't sleep without defined interval #224 5 years ago
nick black e03653b964
fix libav when DISABLE_FFMPEG is used 5 years ago
nick black 99541cc036
pull out terminfo's cub1 5 years ago
nick black 32ff214be2
update demos for ncplane_aligned #237 5 years ago
nick black 2ea4f77875
introduce ncplane_aligned() #237 5 years ago
nick black 8926fc5879
cursor: always get cnorm/civis defs #240 5 years ago
nick black 7d4f9b5231 witherworm: message 5 years ago
nick black bcd12279c0 ncvisual: handle plane resize #169 5 years ago
nick black ed980f1059 pull _get from all accessors 5 years ago
nick black 014afa348b rename ncplane default -> base #236 5 years ago
nick black d5748c634d ncvisual: keep duration sum for better sync #113 5 years ago
nick black 707862507d use video pts when available #113 5 years ago
nick black c21a04137c curry a void* through ncvisual_stream #113 5 years ago
nick black 41153e3c7e notcurses-view: rewrite using ncvisual_stream #113 5 years ago
nick black db8b99d594
notcurses_render: simplify using new alpha rules 5 years ago
nick black c0126b3389
maxcolor: add a legend for transparencies 5 years ago
nick black 924d80f0d5
don't blend default colors #235 5 years ago
nick black 46b1b8e622
notcurses_stats man page #213 5 years ago
nick black 21c3861804
s/bannner/banner/g, heh 5 years ago
nick black e9890eefc0 general foreground elision #131 5 years ago
nick black 5b322add56 glyph-based background spec elision #131
When we emit a glyph that has no background pixels (i.e.
the U+2588 FULL BLOCK glyph), there's no need to emit a
background color change.

Eagle demo currently has hand-coded elision. Results from
80x70 runs using the `-c` parameter:

No optimization: 12.63MiB
Hand-optimized: 12.48MiB
New scheme, no hand-coded optimization: 12.45MiB

w00t!
5 years ago
Nick Black ce2a390b52
Out with googletest, in with doctest #202 (#231)
* introduce doctest over googletest #202
* call dtester in in targets
* doctest conversion #202
* channel.cpp -> doctest #202
* egcpool tests -> doctest #202
* input tests to doctester
* zaxis -> doctest
* drone: always define LANG
* libav to doctest #202
* panelreel tests to doctest #202
* spec that a C++17 compiler is now required for doctest #202
* enmetric tests -> doctest #202
* fade tests -> doctest #202
* notcurses test case -> doctest #202
* last conversion to doctest #202
* finish move to doctest #202
* drone: set up make test
5 years ago
nick black d4caefc55d
fade: throw a 10ms cap in, improves visual and lessens load 5 years ago
nick black 148114c6ca
rewrite term_esc_rgb for ~8% more FPS 5 years ago
nick black 38ace7677f
build man pages properly #213 5 years ago
nick black 132793211c
capabilities testing for fade/ffmpeg 5 years ago
nick black 3544bd86e2
witherworm: don't hide chars below message 5 years ago
nick black fe0c18d5e4
disable eventfd in panelreel demo for now #196 5 years ago
nick black bf49db1ae4
FreeBSD: guard all uses of _unlocked #196 5 years ago
nick black 90f750dec8
eagle: remove direct libav calls 5 years ago
nick black af7cf118a9 HUD: properly initialize backchannel 5 years ago
nick black 09aa606281 FreeBSD: no CLOCK_MONOTONIC_RAW #196 5 years ago
nick black caf7e41737 need struct AVFrame for sans-libav build 5 years ago
nick black 430a321557 don't import av headers in non-ffmpeg build 5 years ago
nick black bd034c983a input: handle modifiers+mouse (alt, shift, ctrl) #226 5 years ago
nick black 1cc100cd2d UMOK: get endgame working once more 5 years ago
nick black fb0e03fe89 UMOK: fadecb for faders #162 5 years ago
nick black a218851acb sweet-ass stats in HUD #162 5 years ago
nick black 91a00b3400 ULTRAMEGAOK: feed the HUD #162 5 years ago
nick black 9402d7e927 HUD: click on X to close HUD 5 years ago
nick black ee99eb53c3 HUD: throw a close-X on the hud 5 years ago
nick black b13da606f6 whiten and shrink HUD 5 years ago
nick black 7f82ac6f16 ULTRAMEGAOK: mouse-moveable HUD #162 5 years ago
nick black 13b376f94f
panelreels: fix logic error at bottom #222 5 years ago
nick black 7906989582
kill obsolete FIXME 5 years ago
nick black 4e841865b3
panelreel-tester: accept offset arguments #180 5 years ago
nick black 770cdf4773
panelreel: plug up hole at the bottom #220 5 years ago
Nick Black 4571b57ece
Rust/FreeBSD (#221)
* rust bindings
* update release documentation with Rust info
* panelreel tester: accept command-line options#180
* input: char32_t not wchar_t in output
* freebsd compilation issues #196
5 years ago
nick black 4d877603c3
maxcolor: fix direction switch 5 years ago
Nick Black 63ada9289c
Implement CELL_ALPHA_BLEND, improve transparency semantics #191 (#219)
* channels_blend() introduced
* implement CELL_ALPHA_BLEND #191
* maxcolor demo: slidingpanel
* much improved transparency semantics #191
* maxcolor: show all transparencies #191
5 years ago
nick black 4b6063e1ce sliders: fix timing 5 years ago
nick black cb2bf16a73 support building sans ffmpeg #153 5 years ago
nick black 99fb662f59
eagle: speed up eagles on small screens 5 years ago
nick black 8d26803ed8
fix linear interpolation on large geometries #216 5 years ago
nick black 7424b3b78c
grid: fix boundary conditions on large displays 5 years ago
nick black 4ba9845143 grid: better background on last scene 5 years ago
nick black 1554685165
boxdemo: default background cell explicitly #211 5 years ago
nick black 4b953e33f2
render: carry state across renders #203 5 years ago
nick black e8064f717b
xray: kill subplane when done 5 years ago
nick black 43e0cb3d30
xray: prep for CELL_ALPHA_BLEND #191 5 years ago
nick black ca5e14cdad
xraydemo: isolate avi/text 5 years ago
nick black 53efe2bd1f
demo-view: don't exit on spurious wakeup 5 years ago
nick black 2601fe9191
demo-input: pass 'q' through in addition to interrupt 5 years ago
nick black a14ec34d78
intro: blink warning if screen is small 5 years ago
nick black 4e0ebde876
intro: advertise 'q' demo: print full matrix 5 years ago
nick black 9e9e5ef648
demoinput: process 'q' at all times 5 years ago
nick black 1017bf42e0
panelreeldemo: stop advertising 'q' 5 years ago
nick black 17a55261dc
witherworms: allow them more space 5 years ago
nick black 86efad6f67
griddemo: clip rgb values, kill white line on side 5 years ago
nick black efcfa372ae
ULTRAMEGAOK: toplevel event handler #207
enable mouse events in the demo. spawn a thread from main() which
brokers all input events. it will consume mouse events, and
publish keyboard events to a queue. rewrite all demo notcurses_getc()
calls to demo_getc() equivalents.
5 years ago
nick black 452e1d302e
output API enhancements #210 #209
Allow -1 in move specification to remain where we are on that
axis (#210), necessary for context-sensitive aligned output.
Add _aligned forms to printf and vprintf. Invert various output
functions so that simpler form is static inline wrapper around
more complicated form, rather than complicated form being a
static inline composition, facilitating atomic move+output. All
output forms now have a simple form (no alignment, placement at
cursor), an _aligned() form, and a _yx() form.
5 years ago
nick black f742676aee Mouse support using button event tracking #165
Request and parse up mouse messages. We handle up to 11 mouse
buttons, 3 modifiers (currently thrown away), motion while
holding down a button, and loss/gain of focus. I've added twelve
new NCKEYs: one for each button, and one for release. In addition,
I've introduced the 'ncinput' struct, which encodes the nckey plus
extra data. The only extra data thus far is coordinates for mouse
events. It is not necessary to provide a ncinput to all input
functions; NULL can be provided if the caller doesn't care about
details. All demos are updated. notcurses-input has been updated
to decode full information of returned ncinputs.

The primary resource for this work was Dickey at al's "XTerm Control
Sequences", https://invisible-island.net/xterm/ctlseqs/ctlseqs.html.
5 years ago
nick black aceda89261 input: add NCKEY_MOUSEEVENT, match against CSI prefix #165 5 years ago
nick black b4b4b3684a yaml 5 years ago
nick black 1555edfa6c
notcurses: disable mouse events on startup/shutdown 5 years ago
nick black 78633de427
mouse: use SGR extended coordinates 5 years ago
nick black ae52d04435
notcurses-input: dim previous lines 5 years ago
nick black ab47ab8976
notcurses_mouse_on()/_off() #165 5 years ago
nick black 046d0314b9
add links to useful man pages 5 years ago
nick black fe7b6bbf89
Samoa, tula'i ma sisi ia lau fu'a, lou pale lea! 5 years ago
nick black f9e18fa1ee
witherworms breed, paint xray banner 5 years ago
nick black 2a256192ad
input: allow duplications of escapes #199 5 years ago
nick black 6b6a00c013
luigi: jump off the right side of the screen 5 years ago
nick black 605293c103
deretardize the witherworms 5 years ago
nick black 708159c686
x-ray demo 5 years ago
Nick Black 4278a53523
Dankamongmen/no prisoners damage (#198)
* notcurses: set up lastframe #189
* render: o(1) take no prisoners damage detection
* EAAAAAAAAAAGLES
* slight background on intro
* 0.9.2
5 years ago
Nick Black 9b81de3789
O(1) passive damage detection #189 (#197)
* notcurses: set up lastframe #189
* render: o(1) take no prisoners damage detection #189
5 years ago
nick black 8b1b2ebdf0
term_esc_rgb: add note about ITU T.416 syntax 5 years ago
nick black d50ee9ec50
ncplane_erase() at the beginning of viewdemo #194 5 years ago
nick black c3fa7ea664
bleachworm replaces widechomper #177 5 years ago
nick black a710222df1
enmetric(): support localized decimal separator #192 5 years ago
Nick Black 3ad2124246
Partial visual renders #170 (#193)
* ncvisual_render() accept four bounding dims #175
* ncvisual_render(): partial renders #175
5 years ago
nick black 7f01dfc241
planereel-tester: delete support 5 years ago
nick black eaf510676d
planereel-tester: randomly-sized tablets #180 5 years ago
Nick Black 0e0925a84e
Planereel exploration app, panelreel logic fixes (#188)
* planereels tester #180
* suppress_banner in all tests
* tabletcb: start passing back tablet
* properly initialize fbbytes stat
* panelreel: logic fixes #178
* install all testing data
5 years ago
nick black b0b1679de6
ncvisual_render(): use true transparency #186 5 years ago
nick black 5403642764
notcurses-input: throw up a banner 5 years ago
nick black 1ebe02cf93
libav: disable stderr logging #174 5 years ago
nick black 0e6c921b28
we break 1k fps in kitty :) 5 years ago
nick black 898806fec1
demo: minimum field width on FPS 5 years ago
nick black 3f326ee0a8 fix up ncplane_set_{bf}g 5 years ago
nick black 21a8e661be
convert all demos to find_data() 5 years ago
nick black 660949a461
griddemo: fix wonky right line 5 years ago
nick black 4950a5ac1a
print enmetricized byte totals 5 years ago
nick black 792b1f2cfb
notcurses-demo: accept -p to find data files #160 5 years ago
nick black db89e71595
track each part of demo #164 5 years ago
nick black 5bec85746d
allow banners to be suppressed 5 years ago
nick black 32e9fd0a1d
notcurses_reset_stats() added + test #164 5 years ago
nick black 15ac1d0411
outro: balance up messages for centering 5 years ago
nick black 11d6f60ed4
clean up eagle poop 5 years ago
nick black 6be6ae2393 eagles: zoom to lower left 5 years ago
nick black 1dde53d0e2 holy fucking shit it works 5 years ago
nick black d6bcb3211f eagles level starts at lower-right 5 years ago
nick black 712c7a16eb fuck yeah 5 years ago
nick black 7ab6febbf9 viewdemo: add a legend. baller as fuck 5 years ago
nick black b257f40a35 sync input documentation for char32_t #172 5 years ago
nick black 0861b96bde wchar_t -> char32_t in input stack #171 5 years ago
nick black 6532ea858b start eagle demo #167 5 years ago
nick black f3f43528f7 implement superplane (NCSCALE_NONE) #168 5 years ago
nick black 3cfe88ee0c ncscale_e enumeration for ncvisuals #168 5 years ago
nick black e2c58534ca work around -Wclobbered-noted problem 5 years ago
nick black e871660eff dig_visible_cell: rewrite recursion as iteration #170 5 years ago
nick black 1a949a5a81
account for tabletmasks 5 years ago
nick black a96e716663
panelreels: account for tablet masking 5 years ago
nick black 4a7409ebda
sprite-enhalfen tool 5 years ago
nick black 97ecbdb0e5
sigh, probably gotta kill DMCA lure 5 years ago
nick black 29eb696947
repair a dumbness 5 years ago
Marek Habersack ff3ed881c0 Improve chances of DirectColor terminal detection
While ncurses 6.1 adds the `RGB` capability to terminfo, the flag is not
commonly used in terminfo entries as of now. The `COLORTERM` environment
variable is, otoh, commonly present and set to either `truecolor` or
`24bit` value by terminal emulators which support direct color.

Add a check for this if `RGB` is false (or absent)

With this check in I was able to properly appreciate the awesomeness of
notcurses demos :)
5 years ago
Nick Black 957549105b
Wide character rigor (#117) (#157)
* unidamage PoC
* add cell_load_simple()
* clear CELL_WIDEASIAN_MASK in cell_load()
* split out render code
* add CELL_SIMPLE_INITIALIZER
* widecolor: fix message plane
* widecolor: simplify color increments
* document wide character handling
* unit tests for wide obliteration #117
* widechar obliteration hardening #117
* widecolor -> widechomper, update man page
5 years ago
nick black 040607c6f9
fix up linear interpolations 5 years ago
Nick Black dfc7623119
Implement notcurses_refresh() #150 (#156)
* boxdemo: clean up colors
* Fix crash on certain resizes due to corruption of damage map #152
* Rewrite ncplane_move_yx(), throwing out ~25 line of code
* implement notcurses_refresh() #150
5 years ago
nick black 0f175e58d3
unidamage PoC #117 5 years ago
nick black c30bd1b531 pass up damage when changing z-axis #146 5 years ago
nick black 91a7427689 render: use unlocked stdio in render path 5 years ago
nick black c5acdaaef0 don't allow moving a plane above/below itself #71 5 years ago
nick black dac4f78ee6 basic unit tests for z-axis #71 5 years ago
nick black 58cc6927ac 256-color cube is not ansi, don't muddy the waters 5 years ago
nick black 65858b4495 unit test 256-index quantizing #4 5 years ago
nick black a916d929db
RGBtoANSI: fixup lower grey onversions, looks reasonable now #4 5 years ago
nick black cfccd0c39c
RGBtoANSI unit test, fix up bases 5 years ago
nick black 8b664a14ef
move RGBtoANSI into internal header 5 years ago
nick black 041e6438e3
quantize to ansi256, atrociously #4 5 years ago
nick black f9ac7a7737
image in README 5 years ago
Nick Black 2de07f8a48
Per-line damage map, ~50% increase in FPS on notcurses-demo (#144)
Implement a fairly conservative, line-granularity, two-level damage map. One on the overall notcurses object is dirtied by planar moves, creations, deletions, and resizes. One on each ncplane is dirtied by glyph output, media rendering, fades, and erasure. #83 This has some definite false positives: a hidden plane which moves will damage a bunch of lines unnecessarily. For now, don't do things like that :D.

Extra byte per line per plane, shouldn't be a problem.

Two new stats for cell elisions and emissions

Allow keypress to interrupt view-demo

ncvisual_stream() now allows a callback per frame

Allow ncvisual_open() to create its own, perfectly-sized, ncplane #128

Typical performance prior to this PR:

4655 renders, 18.3s total (0.000305s min, 0.196s max, 0.0039s avg 253.9 fps)
401046.505KB total (9.688KB min, 139.697KB max, 86.15KB avg)
Emits/elides: def 1082115/116196 fg 10547624/7236460 bg 10602717/6208644
 Elide rates: 9.70% 40.69% 36.93%
4680 renders, 18.4s total (0.000285s min, 0.15s max, 0.0039s avg 255.0 fps)
403078.188KB total (9.688KB min, 139.697KB max, 86.13KB avg)
Emits/elides: def 1088994/116196 fg 10604983/7267750 bg 10655426/6237472
 Elide rates: 9.64% 40.66% 36.92%
4699 renders, 17.8s total (0.000227s min, 0.192s max, 0.0038s avg 263.8 fps)
403266.907KB total (9.688KB min, 139.697KB max, 85.82KB avg)
Emits/elides: def 1086511/116196 fg 10601709/7359116 bg 10661910/6326744
 Elide rates: 9.66% 40.97% 37.24%

After this PR:

5625 renders, 15s total (9.36e-05s min, 0.187s max, 0.0027s avg 375.2 fps)
168365.640KB total (0.930KB min, 139.600KB max, 29.93KB avg)
Emits/elides: def 310575/116196 fg 4486002/4473416 bg 4116835/4630666
 Elide rates: 27.23% 49.93% 52.94%
Cells emitted; 9928000 elided: 12572000 (55.88%)
5642 renders, 14.2s total (9.17e-05s min, 0.154s max, 0.0025s avg 397.0 fps)
168669.009KB total (0.605KB min, 139.600KB max, 29.90KB avg)
Emits/elides: def 310819/116196 fg 4499833/4482134 bg 4118562/4652470
 Elide rates: 27.21% 49.90% 53.04%
Cells emitted; 9962160 elided: 12605840 (55.86%)
5650 renders, 14.3s total (0.000118s min, 0.143s max, 0.0025s avg 395.7 fps)
169461.884KB total (0.860KB min, 139.600KB max, 29.99KB avg)
Emits/elides: def 305431/116196 fg 4515396/4456376 bg 4149967/4613668
 Elide rates: 27.56% 49.67% 52.65%
Cells emitted; 9945200 elided: 12654800 (55.99%)

on netcurses-demo, we're eliding about half of the total cells via this damage map. that's pretty fucking sweet! FPS increase of about 50% -- I'll take that any day of the fuckin' week, boyo. w00t!

https://www.youtube.com/watch?v=XbGs_qK2PQA
5 years ago
nick black ce9eeecc3b
render: eliminate grotesque stupidity
We were doing an entire copy of the framebuffer every fucking
render for no good reason whatsoever. Found this while working
on #83, but let's get it in master immediately. JFC. I suck.

Before (delay factor of 0.5):

[schwarzgerat](0) $ time ./notcurses-demo -d.5
Term: xterm with direct-color indexing
1737 renders, 24.8s total (0.00131s min, 0.362s max, 0.014s avg 70.1 fps)
230217.182KB total (12.696KB min, 223.310KB max, 132.54KB avg)
Emits/elides: def 1074878/126257 fg 6615070/3023957 bg 5519815/3130192
 Elide rates: 10.51% 31.37% 36.19%

real	0m47.653s
user	0m8.977s
sys	0m1.414s
[schwarzgerat](0) $

After (same delay factor of 0.5)

[schwarzgerat](0) $ time ./notcurses-demo -d.5
Term: xterm with direct-color indexing
1741 renders, 23.2s total (0.00125s min, 0.351s max, 0.013s avg 75.0 fps)
231551.089KB total (12.696KB min, 223.310KB max, 133.00KB avg)
Emits/elides: def 1065445/126257 fg 6655295/3006679 bg 5566155/3115184
 Elide rates: 10.59% 31.12% 35.88%

real	0m46.140s
user	0m8.932s
sys	0m1.350s
[schwarzgerat](0) $

Now *there's* the loss we saw during #139 work, thinking we'd get it
back in #143. Good. Huzzah! But also fuck!
5 years ago
nick black 8bd4607e9b
Merge branch 'master' of github.com:dankamongmen/notcurses 5 years ago
nick black f374682134
panelreel: add tablet curry accessors 5 years ago
nick black 4ea62e3c67
input: handle function keys through f30 5 years ago
nick black 364db519bb
stop shifting style bits stupidly 5 years ago
nick black 5deb896696
panelreel-demo: two tablets to start with 5 years ago