Allow zero stride

For some pixel formats, stride has no meaning.
Take this into account and use buffer width instead.

Bug: 143470518
Change-Id: I728b40803e80c4e534504c5b9db55921bb5e7dbc
Merged-In: I728b40803e80c4e534504c5b9db55921bb5e7dbc
Test: android.graphics.cts.ImageDecoderTest#testConserveMemoryPlusHardware
1 file changed