Closed Bug 1300678 Opened 3 years ago Closed 3 years ago

Fix MediaPrefs accesses from the GPU process

Categories

(Core :: Audio/Video: Playback, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox51 --- affected
firefox52 --- fixed

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

References

Details

Attachments

(2 files)

Currently we just skip MediaPrefs calls when we're running in the GPU process (Part 3 of bug 1288618).

We probably want to find a way of making these accessible to the GPU process properly instead of just using default values.

Using gfxVars is probably the easiest way to achieve this.
Assignee: nobody → matt.woodrow
Attachment #8798249 - Flags: review?(dvander)
Comment on attachment 8798249 [details] [diff] [review]
Use gfxVars for media prefs we need to access from the GPU process

Note that these gfxVars lookups won't be live and you'll need to restart the browser for their values to update.

I don't think that should matter too much.
Attachment #8798249 - Flags: review?(jyavenard)
Comment on attachment 8798249 [details] [diff] [review]
Use gfxVars for media prefs we need to access from the GPU process

Review of attachment 8798249 [details] [diff] [review]:
-----------------------------------------------------------------

Looks fine assuming jya is okay with liveness.
Attachment #8798249 - Flags: review?(dvander) → review+
Comment on attachment 8798249 [details] [diff] [review]
Use gfxVars for media prefs we need to access from the GPU process

Review of attachment 8798249 [details] [diff] [review]:
-----------------------------------------------------------------

to me it would be better to have the MediaPrefs initialize in the GPU process, it would be a one-liner , same as initialising gfxVars

::: dom/media/platforms/wmf/DXVA2Manager.cpp
@@ +407,5 @@
>      aFailureReason = nsPrintfCString("IDirect3D9Ex::GetAdapterIdentifier failed with error %X", hr);
>      return hr;
>    }
>  
> +  if (adapter.VendorId == 0x1022 && !gfx::gfxVars::PDMWMFSkipBlacklist()) {

can't you initialize the MediaPrefs in the GPU process?
Attachment #8798249 - Flags: review?(jyavenard) → review+
So, making MediaPrefs work in the GPU process isn't simple. It uses the Preferences API which isn't available.

gfxPrefs has a manual backend which syncs values over IPDL in order to work in the GPU process.

I don't think it's worth adding the same thing for MediaPrefs (since we're unlikely to need many of them in the GPU process), so how about we just move the relevant prefs across to gfxPrefs?
Attachment #8798316 - Flags: review?(jyavenard)
Comment on attachment 8798316 [details] [diff] [review]
move-prefs-to-gfx

Review of attachment 8798316 [details] [diff] [review]:
-----------------------------------------------------------------

Disappointing that media related prefs are now defined in two different spots.
Attachment #8798316 - Flags: review?(jyavenard) → review+
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/96c3388d513e
Use gfxPrefs for media vars that get accessed from the GPU process. r=jya
https://hg.mozilla.org/mozilla-central/rev/96c3388d513e
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.