PictureFlow: Read bitmaps in one go
As suggested by amachronic, this may significantly benefit performance. Change-Id: I4dcf096278ab8042065cf6dce5ff886cdd27dc3d
This commit is contained in:
parent
101d431d79
commit
c94acc771d
1 changed files with 1 additions and 6 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue