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

Skip to content
Commit 4ce5ec0f authored by Alec Mouri's avatar Alec Mouri
Browse files

Properly support the opaque flag in Skia RenderEngine

When the opaque flag is present, the alpha channel from the image is not
used for compositing. But, a layer-wide alpha bit can still be used for
blending, which means the src blending mode can't be used. Other
solutions like lying about the pixel format don't map cleanly to formats
other than RGBA8888 as well. So, we apply a color filter that is adding
a solid black with the input image, which on the vast majority of
formats floods the alpha channel to 1.0 as desired. The one exception
may be FP16 since color values are allowed to be beyond 1.0, but we
don't support FP16 destination buffers anyways.

Bug: 173419151
Test: SurfaceFlinger_test:LayerTypeAndRenderTypeTransactionTests/LayerTypeAndRenderTypeTransactionTest#SetFlagsOpaque

Change-Id: Iec26706bc304df97b55eb2900bbacf13865708ea
parent 4d25380c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment