diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2021-11-23 06:54:50 +0100 |
---|---|---|
committer | Christian Soffke <christian.soffke@gmail.com> | 2021-12-03 02:58:19 +0100 |
commit | c94acc771d24fde560f52db3affd0172fdb6d20e (patch) | |
tree | 1429fd075e4c78ea84ea7aa1c323b11380031953 | |
parent | 101d431d796600952dfd7deb591538af6c874d45 (diff) | |
download | rockbox-c94acc771d24fde560f52db3affd0172fdb6d20e.tar.gz rockbox-c94acc771d24fde560f52db3affd0172fdb6d20e.zip |
PictureFlow: Read bitmaps in one go
As suggested by amachronic, this may significantly benefit performance.
Change-Id: I4dcf096278ab8042065cf6dce5ff886cdd27dc3d
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 7 |
1 files changed, 1 insertions, 6 deletions
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; } |