Update finalUsage datatype to uint64_t.
In SurfaceUtils.cpp, the datatype used for finalUsage
variable is int. finalUsage is passed as a second parameter
to the function native_window_set_usage. However, the datatype
expected for the second parameter (finalUsage) by
native_window_set_usage is uint64_t. This discrepency is causing
invalid bit being set in gralloc. Ex. when vendor uses last bit in
usage for their use case, value for finalUsage in SurfaceUtil is
0x90406900 which comes from usage = 0x90406900 and consumer = 0x900.
However, due to the conversion, the invalid value received in gralloc
is 0xffffffff90404900.
Update the datatype for finalUsage variable to uint64_t which
correctly matches with the functions signature it is used in.
Test: Build is successful, atest CtsVideoTestCases, atest
mediacodecTest, atest CtsMediaMiscTestCases, atest
CtsMediaPlayerTestCases
Change-Id: Id53e9020d33da3977e5957cbcd6449ea477fb0c6
Signed-off-by: Saurabh <sbbanore@amazon.com>
Loading
Please register or sign in to comment