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

RESOLVED FIXED in Firefox 50

Status

()

P3
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jwwang, Assigned: jwwang)

Tracking

unspecified
mozilla50
Points:
---

Firefox Tracking Flags

(firefox50 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
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).
(Assignee)

Comment 1

2 years ago
Created attachment 8770889 [details]
Bug 1286793 - register visibility changes only when needed.

Review commit: https://reviewboard.mozilla.org/r/64216/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/64216/
(Assignee)

Updated

2 years ago
Attachment #8770889 - Flags: review?(dglastonbury)
(Assignee)

Updated

2 years ago
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+
(Assignee)

Comment 3

2 years ago
Thanks!

Comment 4

2 years ago
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/694bbce74b30
register visibility changes only when needed. r=kamidphish

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/694bbce74b30
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox50: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.