OSDN Git Service

minigbm: cros_gralloc/buffer: Do not read from output array
authorTomasz Figa <tfiga@chromium.org>
Fri, 28 Jul 2017 08:23:56 +0000 (17:23 +0900)
committerchrome-bot <chrome-bot@chromium.org>
Wed, 2 Aug 2017 07:35:36 +0000 (00:35 -0700)
commitc6d8da1e249830c773be256a41b8e698587fe9f1
tree68a61c67de8d97f01e6dbffbb35be7e27296495b
parent889b994fcd256a4a14ae0dc80d2104c4a5009151
minigbm: cros_gralloc/buffer: Do not read from output array

Even though it does not currently imply any technical issues, it is not
very elegant for the code to assign buffer map base to addr[0] first and
then modify it in a loop by adding a plan address. Let's just store the
map base in a local variable and use it in plane address calculation.

BUG=b:38250067
TEST=android.media.cts.DecoderTest on veyron_minnie

Change-Id: If2e95086385d96ced760cc94c8c747bffd0c6f55
Reviewed-on: https://chromium-review.googlesource.com/592988
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
cros_gralloc/cros_gralloc_buffer.cc