-
Notifications
You must be signed in to change notification settings - Fork 16.5k
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
31.0.0-beta.7
What operating system are you using?
macOS
Operating System Version
macOS Sonoma 14.4.1
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
30.0.9
Expected Behavior
When a WebContentsView has a transparent background we should be able to render animated or partially transparent content without visual bugs appearing.
Actual Behavior
Visual bugs appear, seeming like paints keep happen on top of each other and keep compounding until you take some action e.g. resizing the window. For example an animated spinner quickly turns into a full, solid circle. Or a partially transparent rectangle starts to get darker over time as the paints keep layering on top of each other.
A gist is attached with this behavior, and the following video shows what I mean since it's a bit hard to describe:
Electron31TransparentRenderingBugs.mov
Testcase Gist URL
https://gist.github.com/6be5a293066790bf03432da7baeb7894
Additional Information
This only appears to happen when the WebContentsView's background color is set to be transparent. If you remove the setBackgroundColor line from the attached Gist the visual bugs dissappear.
I tracked this down to #41326, as this issue was introduced between v31.0.0-nightly.20240304 and v31.0.0-nightly.20240305 and that is the only commit in between. I can also confirm that reverting this PR fixes these visual bugs for me locally.