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
Loading
Please register or sign in to comment