Headless chrome without --disable-gpu flag fails to render a transparent background
Reported by
v04...@gmail.com,
Oct 2 2017
|
|||||||
Issue descriptionChrome Version : 61.0.3163.100 (Official Build) (64-bit) What steps will reproduce the problem? (1) create the following SVG-file (circle.svg): <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'> <circle fill='red' cx='50' cy='50' r='50'/> </svg> (2) Capture a screenshot using headless mode, expecting a png with transparent background: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless --screenshot --window-size=256,256 --default-background-color=00000000 file://$PWD/circle.svg (3) Check screenshot.png What is the expected result? screenshot.png should contain red circle on a transparent background What happens instead? screenshot.png contains red circle on a black background OS: macOS Sierra 10.12.6 (16G29), MacBook Pro (Retina, Mid 2012) Using flag --disable-gpu fixes this behaviour and screenshot.png contains a transparent background, as expected.
,
Oct 3 2017
Thanks for the repro instructions! I can confirm this is happening in both Mac/Linux when enabling gpu eseckler@ is set background color enabled for non-software gpus?
,
Oct 3 2017
eseckler@ is set background color enabled for non-software gpus?
,
Oct 4 2017
I'm not aware of any restrictions when using gpu for transparent rendering, but that doesn't mean that there aren't any. I'll have a look when I have some free cycles, but if anyone else would like to start before then, feel free to snatch this.
,
Jan 15 2018
Looking into this now. Seems this change broke part of this: https://codereview.chromium.org/2944633002/. Reverting it fixes our currently disabled TransparentScreenshots test [1]. Will investigate further. [1] https://cs.chromium.org/chromium/src/content/browser/devtools/protocol/devtools_protocol_browsertest.cc?type=cs&q=transparentscreen&sq=package:chromium&l=952
,
Jan 16 2018
,
Jan 24 2018
With bug 802308 closed, I expect that this is now resolved as well. Please reopen if the problem persists. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by nyerramilli@chromium.org
, Oct 3 2017