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

Skip to content
Commit 2c1d9ef1 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

RenderEngine: draw A8 buffers with a color filter

The A8 buffer was created to behave as a mask - when alpha is 0, the
output should be black. If alpha is 255, the original content should be
shown. Alpha in between should blend with black. This is how the DPU
treats the alpha.

By default, Skia draws an A8 buffer as coverage - the SkPaint's color
(in this case, the default of black) is drawn with the alpha in the
buffer. This is the inverse of what we want. Use a color matrix color
filter to inverse it.

Add a test to verify this works as intended. Update
allocateAndFillSourceBuffer to fill more than the first pixel, so I can
use it in my test. (All existing callers use pass in a size of 1x1, so
they are unaffected.)

Bug: 215706351
Bug: 216146341
Test: librenderengine_test
Change-Id: I340de485fd62bea12a5a097f09073c4f7d58fa90
parent 6223881f
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