-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix transparency #12561
Fix transparency #12561
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 from me, but I'm biased :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@zcbenz should this be tropped to 2-0-x and 1-8-x? |
@ckerr Looking at the original issue it seems that we should backport this. |
/trop run backport-to 2-0-x |
/trop run backport-to 1-8-x |
The backport process for this PR has been manually initiated, sending your 1's and 0's to "2-0-x" here we go! :D |
The backport process for this PR has been manually initiated, sending your 1's and 0's to "1-8-x" here we go! :D |
We have automatically backported this PR to "2-0-x", please check out #12683 |
We have automatically backported this PR to "1-8-x", please check out #12684 |
This fixes #12308.
With the latest chromium, the problem is consistent, i.e. the unscaled capture PNG also did not have transparency. The real fix for this would be to fix it in chromium,
DelegatedFrameHost::CopyFromCompositingSurface
by specifying the result format asRGBA_BITMAP
. Currently, the result format isRGBA_TEXTURE
, which causes the issue.However, chromium is currently making changes and the breaking code path will be going away completely soon (https://bugs.chromium.org/p/chromium/issues/detail?id=759310).
So, for the time being, lets do a hack to preserve the transparency.(thanks to @brenca for this one)
The test creates a browser window with transparent background and captures that into a PNG.
We check the PNG header to make sure that the alpha channel is present in the PNG.