-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
statepixel PoC runs incorrectly on kitty #1704
Comments
these two are composed atop one another |
so yeah, we're keeping a big white panel around somehow |
and yet the debug output reliably shows a 1x1 plane: -------------------------- notcurses debug state -----------------------------
************************* 0x561dd3573850 pile ****************************
0000 off y: 6 x: 85 geom y: 1 x: 1 curs y: 0 x: 0 0x561dd35add80
bound 0x561dd35adaa0 ← 0x561dd35adb10 → (nil) binds (nil)
0001 off y: 0 x: 0 geom y: 24 x: 86 curs y: 0 x: 0 0x561dd35adaa0 bmap
bound 0x561dd3573770 ← 0x561dd35737e0 → (nil) binds 0x561dd35add80
0002 off y: 0 x: 0 geom y: 70 x: 107 curs y: 0 x: 0 0x561dd3573770 std
bound 0x561dd3573770 ← 0x561dd3573860 → (nil) binds 0x561dd35adaa0
______________________________________________________________________________
-------------------------- notcurses debug state -----------------------------
************************* 0x561dd3573850 pile ****************************
0000 off y: 7 x: 85 geom y: 1 x: 1 curs y: 0 x: 0 0x561dd35add80
bound 0x561dd35adaa0 ← 0x561dd35adb10 → (nil) binds (nil)
0001 off y: 0 x: 0 geom y: 24 x: 86 curs y: 0 x: 0 0x561dd35adaa0 bmap
bound 0x561dd3573770 ← 0x561dd35737e0 → (nil) binds 0x561dd35add80
0002 off y: 0 x: 0 geom y: 70 x: 107 curs y: 0 x: 0 0x561dd3573770 std
bound 0x561dd3573770 ← 0x561dd3573860 → (nil) binds 0x561dd35adaa0
______________________________________________________________________________
-------------------------- notcurses debug state -----------------------------
************************* 0x561dd3573850 pile ****************************
0000 off y: 8 x: 85 geom y: 1 x: 1 curs y: 0 x: 0 0x561dd35add80
bound 0x561dd35adaa0 ← 0x561dd35adb10 → (nil) binds (nil)
0001 off y: 0 x: 0 geom y: 24 x: 86 curs y: 0 x: 0 0x561dd35adaa0 bmap
bound 0x561dd3573770 ← 0x561dd35737e0 → (nil) binds 0x561dd35add80
0002 off y: 0 x: 0 geom y: 70 x: 107 curs y: 0 x: 0 0x561dd3573770 std
bound 0x561dd3573770 ← 0x561dd3573860 → (nil) binds 0x561dd35adaa0
______________________________________________________________________________ hrmmmm what could it be? i guess we're not redrawing the cell because it's obscured by the bitmap once the 1x1 plane leaves? then we would expect a transparent one not to suffer this problem. and indeed we do not see it on |
there are two issues here:
the first will be resolved by #1439, which suddenly becomes much more important. this bug is about the latter. capturing the output confirms we're not clearing out the white cells, so it ought just be a matter of ensuring they're damaged. |
yeah, confirmed that we're not emitting the cleanup glyph:
|
those two "damaged" are both coming out of the same rendering cycle, so we're definitely not emitting the replacement glyph. this is probably only working in sixel because there we blow away the underlying glyph when we redraw. i bet that on a transparent bitmap, it wouldn't work there, either. |
nope, it works with a transparent for both sixel and kitty, and indeed we see the glyph emission:
|
yep, needed to damage in the rebuild conditional. let's test this, but it works for this issue. |
looks like a solid fix. i think it's overeager about damage, however. right now i've taken }else if(!crender->p && !crender->s.bgblends){
// if we are a bitmap, and above a cell that has changed (and
// will thus be printed), we'll need redraw the sprixel.
if(crender->sprixel == NULL){
crender->sprixel = s;
}
if(state == SPRIXCELL_ANNIHILATED || state == SPRIXCELL_ANNIHILATED_TRANS){
//fprintf(stderr, "REBUILDING AT %d/%d\n", y, x);
sprite_rebuild(nc, s, y, x);
}
} and i've added after //fprintf(stderr, "damaging due to rebuild [%s] %d/%d\n", nccell_extended_gcluster(crender->p, &crender->c)
crender->s.damaged = 1; but really we only need damage if we changed and we rebuilt, right? |
so trying to put it at the logical place, in if(cellcmp_and_dupfar(pool, prevcell, crender->p, targc) > 0){
//fprintf(stderr, "damaging due to cmp [%s] %d %d\n", nccell_extended_gcluster(crender->p, &crender->c), y,
if(crender->sprixel){
sprixcell_e state = sprixel_state(crender->sprixel, y, *x);
fprintf(stderr, "state under candidate sprixel: %d %d/%d\n", state, y, *x);
if(!crender->s.p_beats_sprixel && SPRIXCELL_OPAQUE_KITTY && state != SPRIXCELL_OPAQUE_SIXEL){
fprintf(stderr, "damaged due to opaque %d/%d\n", y, *x);
crender->s.damaged = 1;
}
}else{ |
The
statepixel
PoC ought load an image, and then iterate over it with a 1x1 white plane on top. This is intended to exercise scrubbing and rebuilding. It works correctly in sixel on XTerm, but in kitty, we both get flicker, and residue on the cells the 1x1 plane has crossed:The text was updated successfully, but these errors were encountered: