Closed Bug 1286793 Opened 8 years ago Closed 8 years ago

Register visibility changes only when MediaPrefs::MDSMSuspendBackgroundVideoEnabled() is true

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

Details

Attachments

(1 file)

Don't pay for what you don't need. MDSM doesn't need to run VisibilityChanged() at all when the pref is off. The code is also simpler for there is only one place to check MediaPrefs::MDSMSuspendBackgroundVideoEnabled().

It also separates policy from mechanism so we have more flexibility to decide when to employ the mechanism (suspend-video-decoding).
Attachment #8770889 - Flags: review?(dglastonbury)
Assignee: nobody → jwwang
Priority: -- → P3
Comment on attachment 8770889 [details]
Bug 1286793 - register visibility changes only when needed.

https://reviewboard.mozilla.org/r/64216/#review61480

I like it.
Attachment #8770889 - Flags: review?(dglastonbury) → review+
Thanks!
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/694bbce74b30
register visibility changes only when needed. r=kamidphish
https://hg.mozilla.org/mozilla-central/rev/694bbce74b30
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: