From c94acc771d24fde560f52db3affd0172fdb6d20e Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Tue, 23 Nov 2021 06:54:50 +0100 Subject: PictureFlow: Read bitmaps in one go As suggested by amachronic, this may significantly benefit performance. Change-Id: I4dcf096278ab8042065cf6dce5ff886cdd27dc3d --- apps/plugins/pictureflow/pictureflow.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'apps/plugins/pictureflow') diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 31baf4a578..2c0a7c3f33 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -2360,12 +2360,7 @@ static int read_pfraw(char* filename, int prio) bm->height = bmph.height; pix_t *data = (pix_t*)(sizeof(struct dim) + (char *)bm); - int y; - for( y = 0; y < bm->height; y++ ) - { - rb->read( fh, data , sizeof( pix_t ) * bm->width ); - data += bm->width; - } + rb->read( fh, data , sizeof( pix_t ) * bm->width * bm->height ); rb->close( fh ); return hid; } -- cgit v1.2.3