70 + uint32_t *pixel = reinterpret_cast<uint32_t*>(®ion.vaddr[j*region.stride + (i * bpp)]);
I know casts like this are in the original code - but I've had problems with them when moving between little-endian and big-endian platforms and when sizeof(int) != .
Looking around, I see that most usage of vaddr s as an array of uint32_t (there's TestGrallocMapper::graphic_region_from_handle() that spuriously uses it as int*, and some use as an array of bytes).
It isn't a blocker, but I have to wonder if there's a better way.
70 + uint32_t *pixel = reinterpret_ cast<uint32_ t*>(®ion. vaddr[j* region. stride + (i * bpp)]);
I know casts like this are in the original code - but I've had problems with them when moving between little-endian and big-endian platforms and when sizeof(int) != .
Looking around, I see that most usage of vaddr s as an array of uint32_t (there's TestGrallocMapp er::graphic_ region_ from_handle( ) that spuriously uses it as int*, and some use as an array of bytes).
It isn't a blocker, but I have to wonder if there's a better way.