dankamongmen / notcurses

blingful character graphics/TUI library. definitely not curses.
https://nick-black.com/dankwiki/index.php/Notcurses
Other
3.59k stars 112 forks source link

use small mosaic draws to handle partial sprixel damage #1563

Open dankamongmen opened 3 years ago

dankamongmen commented 3 years ago

Running the intro demo with sprixel_debug() enabled in sprixel_draw(), I count 16 draws of our orca friend. There should only be 5, maybe 6. Everything that's changing text-wise is annihilated immediately, and shouldn't result in more than one redraw max.

Look into this after #1555 is done (which might resolve this in and of itself).

dankamongmen commented 3 years ago

This is only with Sixel, btw. In Kitty, we have a total of 4 draws in intro.

dankamongmen commented 3 years ago

Going ahead and knocking out #1566 to assist in this effort for 2.3.0.

dankamongmen commented 3 years ago

Stats from #1566 only show 7 draws across intro, the same as Kitty. It's possible that we fixed this during work on #1555; our orca certainly is looking healthier in intro on XTerm...

dankamongmen commented 3 years ago

Hrmmm, the stats show 7 draws, but we're definitely calling sprixel_draw() more times than that.

dankamongmen commented 3 years ago

Ahhh, we were missing a stat increment:

Sprixel emits:elides: 32/273 (89.51%)
dankamongmen commented 3 years ago

Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/52 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/52 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/52 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/52 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/52 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/39 state: 3 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/39 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/39 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/39 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/39 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/39 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/26 state: 3 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/26 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/26 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/26 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/26 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/26 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/13 state: 3 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/13 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/13 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/13 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/13 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/13 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/0 state: 3 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/0 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/0 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/0 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/0 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/0 state: 1 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/0 state: 3 Sprixel 1 (0x55ea02b13280) 23x28 (510x300) @37/0 state: 1 Sprixel 2 (0x55ea02b15760) 18x78 (414x858) @2/1 state: 1 Sprixel emits:elides: 32/273 (89.51%)

dankamongmen commented 3 years ago

State 1 is SPRIXEL_INVALIDATED, and it looks like we're getting a few of those at each location. Doesn't really make sense that we would be, though, IMHO. Perhaps these are coming from the barbership cells? Then why wouldn't we see them in Kitty? Oh, because they're not going to annihilate in Kitty. That makes sense. I bet that's what's up.

Well, let's verify it, and so long as these aren't fake, we'll just have to live with them. Since #1555, the orca looks fine in xterm, so it's not a big deal, I guess. It would definitely be nice to mosaic out these tiny bits of damage.

dankamongmen commented 3 years ago

Yeah, this is due to the barbershop green glyphs. Nothing we can do about that--they're going to overwrite any MIXED sprixcells, and we need to redraw them. The only way I see out of this is to use mosaics to handle partial damage. We can explore that for 3.0, but it's not getting done for 2.3.

dankamongmen commented 3 years ago

See #1444 -- i think we want to move to this for at least kitty graphics.