New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 919966 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug-Regression

Blocked on:
issue 901677



Sign in to add a comment

SkPaint premultiplies alpha even when it shouldn't

Project Member Reported by aaronhk@chromium.org, Jan 8

Issue description

With 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.
 
Cc: jdarpinian@chromium.org
Components: Blink>WebGL
Labels: -Type-Bug -Pri-3 Pri-1 Type-Bug-Regression
Status: Available (was: Untriaged)
Raising to P1. This regresses WebGL conformance and must be fixed immediately.

Blockedon: 901677
Specifying SkBlendMode::Src explicitly seems to solve the problem.

https://chromium-review.googlesource.com/c/chromium/src/+/1379108
Summary: SkPaint premultiplies alpha even when it shouldn't (was: SkSurface::MakeRaster premultiplies alpha even when it shouldn't)
Owner: aaronhk@chromium.org
Status: Assigned (was: Available)
Cc: brianosman@google.com bsalomon@chromium.org
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