mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-10-31 15:20:13 +00:00
move postpaint() out of render step #1135
This commit is contained in:
parent
b2516d8534
commit
8f7fa9da44
@ -195,11 +195,6 @@ namespace ncpp
|
||||
return error_guard (notcurses_render (nc), -1);
|
||||
}
|
||||
|
||||
bool render_to_buffer (char** buf, size_t* buflen) const NOEXCEPT_MAYBE
|
||||
{
|
||||
return error_guard (notcurses_render_to_buffer (nc, buf, buflen), -1);
|
||||
}
|
||||
|
||||
bool render_to_file (FILE* fp) const NOEXCEPT_MAYBE
|
||||
{
|
||||
return error_guard (notcurses_render_to_file (nc, fp), -1);
|
||||
|
@ -1037,15 +1037,12 @@ int notcurses_render_to_file(notcurses* nc, FILE* fp){
|
||||
// locking down the EGC, the attributes, and the channels for each cell.
|
||||
static int
|
||||
notcurses_render_internal(notcurses* nc, struct crender* rvec){
|
||||
int dimy, dimx;
|
||||
ncplane_dim_yx(nc->stdplane, &dimy, &dimx);
|
||||
ncplane* p = ncplane_pile(nc->stdplane)->top;
|
||||
while(p){
|
||||
paint(p, rvec, nc->stdplane->leny, nc->stdplane->lenx,
|
||||
nc->stdplane->absy, nc->stdplane->absx);
|
||||
p = p->below;
|
||||
}
|
||||
postpaint(nc->lastframe, dimy, dimx, rvec, &nc->pool);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1061,6 +1058,7 @@ int notcurses_render(notcurses* nc){
|
||||
if(notcurses_render_internal(nc, crender) == 0){
|
||||
clock_gettime(CLOCK_MONOTONIC, &rasterdone);
|
||||
update_render_stats(&rasterdone, &start, &nc->stats);
|
||||
postpaint(nc->lastframe, dimy, dimx, crender, &nc->pool);
|
||||
bytes = notcurses_rasterize(nc, crender, nc->rstate.mstreamfp);
|
||||
}
|
||||
update_render_bytes(&nc->stats, bytes);
|
||||
@ -1089,6 +1087,7 @@ int notcurses_render_to_buffer(notcurses* nc, char** buf, size_t* buflen){
|
||||
if(notcurses_render_internal(nc, crender) == 0){
|
||||
clock_gettime(CLOCK_MONOTONIC, &rasterdone);
|
||||
update_render_stats(&rasterdone, &start, &nc->stats);
|
||||
postpaint(nc->lastframe, dimy, dimx, crender, &nc->pool);
|
||||
bytes = notcurses_rasterize_inner(nc, crender, nc->rstate.mstreamfp);
|
||||
}
|
||||
update_render_bytes(&nc->stats, bytes);
|
||||
|
Loading…
Reference in New Issue
Block a user