Use pixel format from buffer to determine opacity.

The format that's passed into BufferQueueLayer creation is meant to
define what format the buffers should have that are dequeued from the
consumer. If the client submits its own buffers, they can have any
pixel format. Therefore, the format from the activeBuffer should be used
when determing opacity since that's the information about the buffer
that will be rendered.

Bug: 152162496
Test: dumpsys SurfaceFlinger
Test: LayerTypeAndRenderTypeTransactionTest#SetBufferFormat
Change-Id: Ifdaa43c28c78ef96a2e8ea4fcbb9886a6227df4d
Merged-In: I4295b837369b8ca8918d8398a29cab133a47cbf7
Signed-off-by: wukui1 <wukui1@xiaomi.com>
8 files changed