Repository navigation
Fix transparency - #12561
Merged
Merged
Fix transparency#12561
Conversation
brenca
approved these changes
Apr 9, 2018
brenca
left a comment
Contributor
There was a problem hiding this comment.
👍 from me, but I'm biased :D
Member
|
@zcbenz should this be tropped to 2-0-x and 1-8-x? |
Contributor
|
@ckerr Looking at the original issue it seems that we should backport this. |
Contributor
|
/trop run backport-to 2-0-x |
Contributor
|
/trop run backport-to 1-8-x |
Contributor
|
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 |
Contributor
|
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 |
Contributor
|
We have automatically backported this PR to "2-0-x", please check out #12683 |
Contributor
|
We have automatically backported this PR to "1-8-x", please check out #12684 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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::CopyFromCompositingSurfaceby 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.