diff options
author | Leon Scroggins III <scroggo@google.com> | 2020-02-19 16:38:24 -0500 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2020-02-20 13:41:17 +0000 |
commit | 3d334d816a639a5fca93b9ef6319849833073b2f (patch) | |
tree | 4c19914e1665fdc774bb63413dc21dc67f5420bb /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | b96b334d4366102fa21e6fb771229ce42e6ac86c (diff) |
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
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions