stop exporting lookup_blitset()

the media code that makes up non-core libnotcurses called
into lookup_rgba(). instead, have them use the new
funtion ncvisual_blitter_geom() to access the actual blitter
being used. we can then hide lookup_blitset(), which ought
never have been exported. closes #1519.
pull/1520/head
nick black 3 years ago
parent d4fff6a921
commit 9dbcef9969
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -1413,7 +1413,7 @@ int kitty_blit(ncplane* nc, int linesize, const void* data,
int term_fg_rgb8(bool RGBflag, const char* setaf, int colors, FILE* out,
unsigned r, unsigned g, unsigned b);
API const struct blitset* lookup_blitset(const tinfo* tcache, ncblitter_e setid, bool may_degrade);
const struct blitset* lookup_blitset(const tinfo* tcache, ncblitter_e setid, bool may_degrade);
static inline int
rgba_blit_dispatch(ncplane* nc, const struct blitset* bset,

@ -402,10 +402,7 @@ int ffmpeg_stream(notcurses* nc, ncvisual* ncv, float timescale,
}
// decay the blitter explicitly, so that the callback knows the blitter it
// was actually rendered with
const struct blitset* bset = rgba_blitter(nc, &activevopts);
if(bset){
activevopts.blitter = bset->geom;
}
ncvisual_blitter_geom(nc, ncv, &activevopts, NULL, NULL, NULL, NULL, &activevopts.blitter);
if((newn = ncvisual_render(nc, ncv, &activevopts)) == NULL){
if(activevopts.n != vopts->n){
ncplane_destroy(activevopts.n);

@ -27,10 +27,7 @@ int oiio_stream(struct notcurses* nc, ncvisual* ncv, float timescale,
do{
// decay the blitter explicitly, so that the callback knows the blitter it
// was actually rendered with
const struct blitset* bset = rgba_blitter(nc, &activevopts);
if(bset){
activevopts.blitter = bset->geom;
}
ncvisual_blitter_geom(nc, ncv, &activevopts, NULL, NULL, NULL, NULL, &activevopts.blitter);
if((newn = ncvisual_render(nc, ncv, &activevopts)) == NULL){
if(activevopts.n != vopts->n){
ncplane_destroy(activevopts.n);

@ -160,6 +160,8 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts,
notcurses_check_pixel_support(nc);
}
continue;
}else if(keyp >= '7' && keyp <= '9' && !ni.alt && !ni.ctrl){
continue; // don't error out
}else if(keyp == NCKey::Up){
// FIXME move backwards significantly
continue;
@ -396,7 +398,8 @@ int rendered_mode_player_inner(NotCurses& nc, int argc, char** argv,
nc.refresh(nullptr, nullptr);
}else if(ie >= '0' && ie <= '6'){
--i; // rerun same input with the new blitter
vopts.blitter = blitter = static_cast<ncblitter_e>(ie - '0');
}else if(ie >= '7' && ie <= '9'){
--i; // just absorb the input
}else if(ie == NCKey::Resize){
--i; // rerun with the new size
if(!nc.refresh(&dimy, &dimx)){

Loading…
Cancel
Save