notcurses icon indicating copy to clipboard operation
notcurses copied to clipboard

use small mosaic draws to handle partial sprixel damage

Open dankamongmen opened this issue 3 years ago • 9 comments

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 avatar Apr 20 '21 03:04 dankamongmen

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

dankamongmen avatar Apr 20 '21 03:04 dankamongmen

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

dankamongmen avatar Apr 21 '21 15:04 dankamongmen

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 avatar Apr 21 '21 15:04 dankamongmen

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

dankamongmen avatar Apr 21 '21 15:04 dankamongmen

Ahhh, we were missing a stat increment:

Sprixel emits:elides: 32/273 (89.51%)

dankamongmen avatar Apr 21 '21 16:04 dankamongmen

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 avatar Apr 21 '21 16:04 dankamongmen

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 avatar Apr 21 '21 16:04 dankamongmen

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 avatar Apr 21 '21 16:04 dankamongmen

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

dankamongmen avatar Aug 19 '21 20:08 dankamongmen