Closed Bug 1565980 Opened 5 years ago Closed 5 years ago

Flash is broken with wmode=gpu and WebRender

Categories

(Core :: Graphics: WebRender, defect, P2)

68 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- disabled
firefox68 --- wontfix
firefox69 --- verified
firefox70 --- verified

People

(Reporter: rafq4, Assigned: jrmuizel)

References

(Regression)

Details

(Keywords: regression)

Attachments

(6 files, 2 obsolete files)

Attached image problem.jpg

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

  1. Tried to reinstall Firefox
  2. Tried to reinstall FlashPlayer
  3. Tried to clear cookies, cashe memory, history, turn off protection(blocking cookies etc)
  4. Checked fresh updated version of Firefox and FlashPlayer
  5. Tried to clear FlashPlayer cashe memory
  6. checked, if FlashPlayer is not blocked on the page
  7. Graphics drivers updated
  8. Windows updated

Actual results:

Problem affects DarkOrbit browser game. It's working on FP and every try of playing ends with black blank page. Problem started when I changed computer parts and my OS from Windows 7 Ultimate 64bit to Windows 10 Pro 64bit. Tried to play on other browsers, and works fine. Problem lies only with Firefox

Expected results:

Game should work fine like on my previous OS, did everything I could by my knowledge, on other browsers game works fine. Don't know what may be problem

Well.. tried to start Firefox in safe mode by "Help -> Restart with Add-ons disabled" else and it works. But when I'm going to default mode with turned off everything, what is turned off in safe mode, still doesn't work. Strange situation

Flags: needinfo?(rafq4)

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0
Build ID: 20190718215316

I can reproduce this issue on Windows 10x64 using the latest Nightly 70.0a1 and Firefox 69 beta 5 . The issue is not webRender related, since I disabled it and still didn't work. If I go to Options and disable hardware acceleration, then everything works fine.

The issue is not reproducible on Firefox 68.0.1.

I am going to assign the "Core:Graphics" component for it and hopefully someone with more knowledge in this area will a look over this.

Component: Untriaged → Graphics
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true

Hey Rafal, could you please provide the info from about:support?
We are interested mostly in the graphics part.
Thanks!

Moving this over to WebRender due to the following results:
Graphics cards: Intel HD graphics 4600/530, AMD RX550, NVIDIA GeForce GT 730

  • Nightly70
    WebRender on: game doesn't load
    WebRender off: game doesn't load

  • Beta 69.0b7:
    Webrender ON: game doesn't load
    Webrender OFF: game does load

Not quite sure about the Nightly70 affected flag, given that the game doesn't load regardless of the pref flip.

Component: Graphics → Graphics: WebRender
Blocks: wr-69
Summary: flashplayer leaves blank black page → Flash is broken with wmode=gpu and WebRender
Attached file Example of flash with wmode=gpu (obsolete) —

Jim, do you know what wmode=gpu does compared to wmode=window and wmode=direct?

Flags: needinfo?(rafq4) → needinfo?(jmathies)

Hey Jeromie, can you provide some detail on what this gpu wmode does? We're considering swapping that internally with 'direct' mode as a possible work around to a web renderer issue. Not sure though what the 'gpu' mode exposes to flash content internally.

Flags: needinfo?(jmathies) → needinfo?(jeclark)

Rafal, is there any way to test direct mode with your game, let us know if that addresses the issue?

Flags: needinfo?(rafq4)

Tinic's blog post from way back in the day has a good explanation of the differences between WMODE=direct and WMODE=gpu:
https://web.archive.org/web/20080520033345/http://www.kaourantin.net/2008/05/what-does-gpu-acceleration-mean.html

In most practical scenarios it comes down to whether or not you want to be able to composite HTML elements over the top of the Flash rectangle when using hardware acceleration. If you want Flash to always be on top (e.g. for Video playback) use WMODE=direct. If you want to do something like a hardware accelerated game where you might composite other UI elements on top of the Flash window (it's weird, but it happens - think HTML-based flyout windows that descend down over the Flash content), then you'd want to use wmode=gpu.

Flags: needinfo?(jeclark)
Attached file wmode=gpu with overlay
Attachment #9080329 - Attachment is obsolete: true
Attached file wmode=direct with overlay (obsolete) —

(In reply to Jeromie Clark from comment #9)

Tinic's blog post from way back in the day has a good explanation of the differences between WMODE=direct and WMODE=gpu:
https://web.archive.org/web/20080520033345/http://www.kaourantin.net/2008/05/what-does-gpu-acceleration-mean.html

In most practical scenarios it comes down to whether or not you want to be able to composite HTML elements over the top of the Flash rectangle when using hardware acceleration. If you want Flash to always be on top (e.g. for Video playback) use WMODE=direct. If you want to do something like a hardware accelerated game where you might composite other UI elements on top of the Flash window (it's weird, but it happens - think HTML-based flyout windows that descend down over the Flash content), then you'd want to use wmode=gpu.

This seems reversed from the actual behavior. If you take a look at the examples that I attacehd in Firefox with WebRender disabled or Chrome wmode=direct shows content on top while wmode=gpu does not. Did you just typo them or is there some other confusion?

Flags: needinfo?(jeclark)

The issue is that you're asking about a feature that shipped over a decade ago, where the browser, operating system and Flash have all evolved significantly since those features were introduced. Given the history and complexity, I'm not surprised that there's a difference between the documentation created when the feature was built, and the ground-truth today; however, much of the institutional knowledge about how and why that might be the case isn't readily available.

Our vague collective recollection is that we made a number of Firefox-specific changes in collaboration with Mozilla around the introduction of Electrolysis and 64-bit Flash sandboxing on WIndows and that we definitely changed behavior around windowless mode, and that we're prettty sure that 64-bit Firefox always uses wmode=direct and that other modes are either coerced to direct, or simulated (to the extent possible) on top of direct.

If a precise answer is critical to helping you fix this, we'd need to actually assign someone to investigate and/or collaborate with you on how to arrive at a workable outcome. It's not straightforward, and there have been a lot of major changes to both Flash and Firefox in the last few years that probably bear on this.

Flags: needinfo?(jeclark)

I checked mozregression with

The result was the following. Bug 1549674 seems a culprit. CompositorWindow usage seems to cause the problem during disabling WebRender.

15:24.40 INFO: No more inbound revisions, bisection finished.
15:24.40 INFO: Last good revision: 34a413cfb0d225c4a2007b4d37bb63087d5a1436
15:24.40 INFO: First bad revision: e96752781d2d3961d797cec48c5357c4ec293a23
15:24.40 INFO: Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=34a413cfb0d225c4a2007b4d37bb63087d5a1436&tochange=e96752781d2d3961d797cec48c5357c4ec293a23

When window less mode was forced in PluginModuleParent::NPP_NewInternal() by ForceWindowless(), the problem was addressed with/without WebRender.
https://searchfox.org/mozilla-central/source/dom/plugins/ipc/PluginModuleParent.cpp#2059

Since a regression range was provided I will remove the regressionwindow-wanted tag.

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

The result was the following. Bug 1549674 seems a culprit. CompositorWindow usage seems to cause the problem during disabling WebRender.

Assigning to you Sotaro since you understand the presentation code best, don't hesitate to reassign if you don't have time to continue looking into this.

Assignee: nobody → sotaro.ikeda.g
Priority: -- → P2

Sorry for so long absence. I read everything here and shamely must say I feel a bit green like cucumber, when reading all those technicall things. If you need some info from me, may you write step by step, what should I do?

Flags: needinfo?(rafq4)

Hey Jeff, FYI I was curious so I tested. On my system this game (DarkOrbit Reloaded) triggers windowed mode.

Flags: needinfo?(jmuizelaar)
See Also: → 1347925

This fixes wmode='gpu' with WebRender.

unassign myself, since :jrmuizel is already working for creating a patch.

Assignee: sotaro.ikeda.g → nobody
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → jmuizelaar

Please nominate this for Beta approval when you get a chance.

Attached file b3dx.swf
Attached file wmode-gpu.html
Attached file wmode-direct.html
Attachment #9080456 - Attachment is obsolete: true

Comment on attachment 9080772 [details]
Bug 1565980. Force wmode 'gpu' to 'direct'.

Beta/Release Uplift Approval Request

  • User impact if declined: Flash with wmode='gpu' will not work with WebRender enabled.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): This forces flash to use direct mode even when WebRender is not enabled. It's possible that this could cause regressions.
  • String changes made/needed:
Flags: needinfo?(jmuizelaar)
Attachment #9080772 - Flags: approval-mozilla-beta?

Rafal is this fixed for you now?

Flags: needinfo?(rafq4)

Actually, nevermind. It's not on 68 yet.

Flags: needinfo?(rafq4)
Flags: qe-verify+

Comment on attachment 9080772 [details]
Bug 1565980. Force wmode 'gpu' to 'direct'.

Forces Flash to use direct mode even when gpu is specified to fix broken Flash content with WebRender enabled. Approved for 69.0b9. Given the risk of regression here, I do think it would be good to have QA do some testing around this.

Attachment #9080772 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Timea, can you confirm that the game works with WebRender on and WebRender off on 70?

Flags: needinfo?(timea.zsoldos)
QA Whiteboard: [qa-triaged]

Stealing NI? from the other Timea

Yes, it works now!
Verified - fixed on latest Nightly 70.0a1 (2019-07-29) (64-bit) on Windows 10 with Webrender ON and OFF with the following cards:
Intel HD graphics 4600, AMD RX550, NVIDIA GeForce GT 730

Waiting for fix to land in Beta.
Thanks!

Flags: needinfo?(timea.zsoldos)

This issue is Verified as Fixed in Firefox Beta 69.0b9 on Windows 10 with Webrender ON and OFF with the following cards:
Intel HD graphics 4600, AMD RX550, NVIDIA GeForce GT 730. I will mark this issue accordingly.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: