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) | |||
2360 | bm->height = bmph.height; | 2360 | bm->height = bmph.height; |
2361 | pix_t *data = (pix_t*)(sizeof(struct dim) + (char *)bm); | 2361 | pix_t *data = (pix_t*)(sizeof(struct dim) + (char *)bm); |
2362 | 2362 | ||
2363 | int y; | 2363 | rb->read( fh, data , sizeof( pix_t ) * bm->width * bm->height ); |
2364 | for( y = 0; y < bm->height; y++ ) | ||
2365 | { | ||
2366 | rb->read( fh, data , sizeof( pix_t ) * bm->width ); | ||
2367 | data += bm->width; | ||
2368 | } | ||
2369 | rb->close( fh ); | 2364 | rb->close( fh ); |
2370 | return hid; | 2365 | return hid; |
2371 | } | 2366 | } |