mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +00:00
move blitters to pool_blit_direct(), 65% savings in quadblitter #1064
This commit is contained in:
parent
a3fec92e16
commit
eb0cd40910
@ -78,7 +78,7 @@ tria_blit_ascii(ncplane* nc, int placey, int placex, int linesize,
|
|||||||
}else{
|
}else{
|
||||||
cell_set_fg_rgb8(c, rgbbase_up[rpos], rgbbase_up[1], rgbbase_up[bpos]);
|
cell_set_fg_rgb8(c, rgbbase_up[rpos], rgbbase_up[1], rgbbase_up[bpos]);
|
||||||
cell_set_bg_rgb8(c, rgbbase_up[rpos], rgbbase_up[1], rgbbase_up[bpos]);
|
cell_set_bg_rgb8(c, rgbbase_up[rpos], rgbbase_up[1], rgbbase_up[bpos]);
|
||||||
if(cell_load(nc, c, " ") <= 0){
|
if(pool_load_direct(&nc->pool, c, " ", 1, 1) <= 0){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -424,7 +424,7 @@ quadrant_blit(ncplane* nc, int placey, int placex, int linesize,
|
|||||||
cell_set_fg_alpha(c, CELL_ALPHA_BLEND);
|
cell_set_fg_alpha(c, CELL_ALPHA_BLEND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(*egc && cell_load(nc, c, egc) <= 0){
|
if(*egc && pool_blit_direct(&nc->pool, c, egc, strlen(egc), 1) <= 0){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
++total;
|
++total;
|
||||||
@ -558,7 +558,7 @@ braille_blit(ncplane* nc, int placey, int placex, int linesize,
|
|||||||
char egc[4] = { 0xe2, 0xa0, 0x80, 0x00 };
|
char egc[4] = { 0xe2, 0xa0, 0x80, 0x00 };
|
||||||
egc[2] += egcidx % 64;
|
egc[2] += egcidx % 64;
|
||||||
egc[1] += egcidx / 64;
|
egc[1] += egcidx / 64;
|
||||||
if(cell_load(nc, c, egc) <= 0){
|
if(pool_blit_direct(&nc->pool, c, egc, strlen(egc), 1) <= 0){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user