PictureFlow: Read bitmaps in one go

As suggested by amachronic, this may significantly benefit performance.

Change-Id: I4dcf096278ab8042065cf6dce5ff886cdd27dc3d
This commit is contained in:
Christian Soffke 2021-11-23 06:54:50 +01:00
parent 101d431d79
commit c94acc771d

View file

@ -2360,12 +2360,7 @@ static int read_pfraw(char* filename, int prio)
bm->height = bmph.height; bm->height = bmph.height;
pix_t *data = (pix_t*)(sizeof(struct dim) + (char *)bm); pix_t *data = (pix_t*)(sizeof(struct dim) + (char *)bm);
int y; rb->read( fh, data , sizeof( pix_t ) * bm->width * bm->height );
for( y = 0; y < bm->height; y++ )
{
rb->read( fh, data , sizeof( pix_t ) * bm->width );
data += bm->width;
}
rb->close( fh ); rb->close( fh );
return hid; return hid;
} }