Commit Graph

560 Commits

Author SHA1 Message Date
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
2019-12-17 23:07:21 -05:00
nick black
0f175e58d3
unidamage PoC #117 2019-12-17 00:33:51 -05:00
nick black
c30bd1b531 pass up damage when changing z-axis #146 2019-12-16 23:20:13 -05:00
nick black
48adc31260 unit test for z-axis rendering #146 2019-12-16 23:20:13 -05:00
nick black
01ac18fb35
s/Open Source/free software/g 2019-12-16 21:41:07 -05:00
nick black
165170dd51 if the man prefers 'free software', use that term 2019-12-16 21:31:18 -05:00
nick black
91a7427689 render: use unlocked stdio in render path 2019-12-16 21:31:18 -05:00
nick black
c5acdaaef0 don't allow moving a plane above/below itself #71 2019-12-16 21:31:18 -05:00
nick black
599b7a6d9a z-axis unit tests #71 2019-12-16 21:31:18 -05:00
nick black
dac4f78ee6 basic unit tests for z-axis #71 2019-12-16 21:31:18 -05:00
nick black
58cc6927ac 256-color cube is not ansi, don't muddy the waters 2019-12-16 21:31:18 -05:00
nick black
65858b4495 unit test 256-index quantizing #4 2019-12-16 21:31:18 -05:00
nick black
8c40f6076b
link to other tui libraries worth their druthers 2019-12-16 02:00:33 -05:00
nick black
a916d929db
RGBtoANSI: fixup lower grey onversions, looks reasonable now #4 2019-12-15 23:13:13 -05:00
nick black
cfccd0c39c
RGBtoANSI unit test, fix up bases 2019-12-15 21:33:26 -05:00
nick black
8b664a14ef
move RGBtoANSI into internal header 2019-12-15 21:13:56 -05:00
nick black
041e6438e3
quantize to ansi256, atrociously #4 2019-12-15 20:53:10 -05:00
nick black
f9ac7a7737
image in README 2019-12-15 17:17:20 -05:00
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
2019-12-15 13:46:47 -05:00
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!
2019-12-15 12:23:38 -05:00
nick black
8bd4607e9b
Merge branch 'master' of github.com:dankamongmen/notcurses 2019-12-15 05:22:19 -05:00
nick black
f374682134
panelreel: add tablet curry accessors 2019-12-15 05:22:12 -05:00
nick black
4ea62e3c67
input: handle function keys through f30 2019-12-15 02:18:54 -05:00
nick black
364db519bb
stop shifting style bits stupidly 2019-12-15 02:06:18 -05:00
nick black
bfda5a53d6
add CELL_SIMPLE_INITIALIZER to docs 2019-12-15 01:29:41 -05:00
nick black
5deb896696
panelreel-demo: two tablets to start with 2019-12-14 20:21:26 -05:00
nick black
4118500897
we lost mssr valéry 2019-12-14 18:44:04 -05:00
nick black
2dd2d84401
copy over panelreel documentation 2019-12-14 18:43:12 -05:00
nick black
26c575a262
spelling 2019-12-14 18:39:56 -05:00
nick black
3b2f72538e
decode more special keys in notcurses-input #134 2019-12-14 18:37:09 -05:00
nick black
91f74901c2
verify cell_load() of ascii results in simple #140 2019-12-14 18:02:58 -05:00
nick black
c9b6f84dec
fix up default elision in alpha channels #143 2019-12-14 17:59:39 -05:00
Nick Black
8bd8055f72
Distinct fg/bg alpha channels #139 (#141)
* improved alpha macros
* demo: use new alpha macros
* add ncplane_set_*_alpha()
* explicitly set fg for uniblock
* outro: background is a space #139
* distinct alpha channels for fg/bg #139
* rename 'background' cell to 'default' #142
* doc palette fades
2019-12-14 17:34:10 -05:00
nick black
582017a16a
more docing 2019-12-14 07:23:49 -05:00
nick black
4ad1321dce
remove double-define from README 2019-12-14 07:11:26 -05:00
nick black
89b6af2166
docs docs docs, all day long 2019-12-14 07:04:43 -05:00
nick black
46544bec0c
merge paras 2019-12-14 06:40:01 -05:00
Nick Black
ff463d464e
Channels API sanity #119 (#138)
* orthogonalize channel/channels/cells APIs #119
* sync README.md with new ncplane channels api #119
2019-12-14 05:33:34 -05:00
nick black
e3dd36a1a4
link to release in history 2019-12-13 21:00:47 -05:00
nick black
3b987b4993
ncplane_box(): update documentation 2019-12-13 20:58:44 -05:00
nick black
12018f3096
document nl_langinfo() check 2019-12-13 20:53:18 -05:00
nick black
54eb41cf3a
panelreel-demo: done after demodelay * 5 #135 2019-12-13 20:25:48 -05:00
nick black
88163325fa
widecolor: proceed without keypress #135 2019-12-13 20:10:39 -05:00
nick black
d500bf166e
block_on_input(): allow a NULL sigmask 2019-12-13 20:09:16 -05:00
nick black
f407d7b114
ncplane_box: control corner drawing, stop emitting extra vlines #133 2019-12-13 19:45:34 -05:00
nick black
a1c90a347a
add ncplane_box() corner masking 2019-12-13 19:40:22 -05:00
nick black
7e24066816
note about bottommost, rightmost coordinate 2019-12-13 19:22:11 -05:00
nick black
71a2660b57
fatal_handler: grab ABRT as well 2019-12-13 19:18:24 -05:00
nick black
e6d35978d4
add notcurses_refresh() declaration 2019-12-13 18:02:35 -05:00
nick black
18a33a0328
handle still more key sequences #134 2019-12-13 17:18:54 -05:00