Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3d334d81 authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Leon Scroggins
Browse files

Make Bitmap::createFrom() account for zero stride

Bug: 143470518
Test: android.graphics.cts.ImageDecoderTest#testConserveMemoryPlusHardware

Follow up to ag/10045682, which was resolving a merge conflict. The
original fix (https://android-review.googlesource.com/1203783) was
on the single Bitmap constructor which took a GraphicBuffer parameter.
The conflict was with ag/9130111, which switched the input to an
AHardwareBuffer and split this version of Bitmap::createFrom into two
methods. The constructor no longer has access to the information
regarding the buffer stride, so that got moved into Bitmap::createFrom.
But both versions should have the fix. (In fact, it appears that the
version that did *not* have the fix is the one being called in
testConserveMemoryPlusHardware.)

Move the rowBytes computation into a common method so that both will
have the fix.

Change-Id: I16f77528abdb331af556bbe5d0485fe342f2325e
parent b96b334d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment