Skip to content
Snippets Groups Projects
Commit cea66c14 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Another big speedup...

Since we update the bitmap before drawing a frame now, we can just
mark the cells incorrectly moved by advancing the bitmap ringbuffer
as dirty and known they'll be redrawn.

This gets rid of the memmove on full-width scrolling, and gets us
into the 6s range.
parent c6a2f44f
No related branches found
No related tags found
No related merge requests found
Pipeline #7720 passed
......@@ -1441,18 +1441,12 @@ bitmap_movetext_screen(int x, int y, int tox, int toy, int direction, int height
if (screena.toprow < 0)
screena.toprow += screena.screenheight;
/*
* Set up to move bits that were *not* moved back to
* where they should have stayed.
*/
if (direction == -1)
direction = 1;
else
direction = -1;
height = vstat.rows - height;
int moved = y - toy;
toy = vstat.rows - (height - 1);
y = toy - moved;
// Fill the bits with impossible data so they're redrawn
memset(&bitmap_drawn[(toy - 1) * vstat.cols], 0x04, sizeof(*bitmap_drawn) * height * vstat.cols);
pthread_mutex_unlock(&screenlock);
return;
}
int maxpos = screena.screenwidth * screena.screenheight;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment