https://bugs.documentfoundation.org/show_bug.cgi?id=156361
--- Comment #6 from Patrick Luby <plub...@neooffice.org> --- (In reply to Patrick Luby from comment #5) > So, I think mpGraphics->BlendBitmap() needs to use the following blending > algorithm: > > r = 1 - ((1 - d) + ((1 - d) * (1 - s))) Disclaimer: the above is a little too simplistic as the source grayscale can still override the destination grayscale in certain cases. But it hopefully illustrates what I think is happening. I think the safest way to blend the alpha masks is to do the following: 1. In mpGraphics->BlendAlphaBitmap(), after drawing is finished, extract the destination surface's alpha channel from its SkAlphaShader, invert it, and overwrite the pSalAlphaBmp2 parameter. 2. Remove call to mpGraphics->BlendBitmap() since mpGraphics->BlendAlphaBitmap() will pSalAlphaBmp2 has been overwritten. -- You are receiving this mail because: You are the assignee for the bug.