Issue metadata
Sign in to add a comment
|
SkPaint premultiplies alpha even when it shouldn't |
||||||||||||||||||||
Issue descriptionWith the change in this CL: https://chromium-review.googlesource.com/c/chromium/src/+/1379108 These conformance tests begin to fail: https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/image_bitmap_from_image_bitmap/ Diving into it a bit, all failures happen with `premultiplyAlpha=false` and an input image with alpha 0. The resulting image has black pixels, though it should not, as if the alpha has been pre-multiplied. For now I'm updating the test expectations, but it seems like something odd or unexpected is happening within Skia. Either that or StaticBitmapImage::ConverToColorSpace should be using a different method.
,
Jan 8
,
Jan 9
Specifying SkBlendMode::Src explicitly seems to solve the problem. https://chromium-review.googlesource.com/c/chromium/src/+/1379108
,
Jan 9
,
Jan 14
,
Jan 14
According to bsalomon@ this is expected behavior as skia is unable to draw without first pre-multiplying. Either Skia should throw an error when asked to draw bitmaps marked as unpremul, or this is working as intended. |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by kbr@chromium.org
, Jan 8Components: Blink>WebGL
Labels: -Type-Bug -Pri-3 Pri-1 Type-Bug-Regression
Status: Available (was: Untriaged)