> 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.
I gave consideration to making this part of the code shiny yesterday, however, its really just used by one android-specific integration test case at the moment. At the moment, expanding beyond that one test case is where I'd want to sink time into polishing.
> 70 + uint32_t *pixel = cast<uint32_ t*>(®ion. vaddr[j* region. stride + (i * bpp)]); er::graphic_ region_ from_handle( ) that spuriously uses
> reinterpret_
>
> 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
> 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.
I gave consideration to making this part of the code shiny yesterday, however, its really just used by one android-specific integration test case at the moment. At the moment, expanding beyond that one test case is where I'd want to sink time into polishing.