Closed Bug 1185388 Opened 10 years ago Closed 10 years ago

[EME] Limit cores used by WMF in gmp-clearkey

Categories

(Core :: Audio/Video, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: cpearce, Assigned: eflores)

References

Details

Attachments

(1 file, 1 obsolete file)

As in bug 1172841, we should limit the number of cores that WMF uses to decode in gmp-clearkey, so that Firefox's rendering doesn't get starved on low end hardware or at high framerates.
Edwin, can you take this please?
Flags: needinfo?(edwin)
Flags: needinfo?(edwin)
QA Contact: edwin
Assignee: nobody → edwin
QA Contact: edwin
Attached patch 1185388.patch (obsolete) — Splinter Review
Attachment #8642210 - Flags: review?(cpearce)
Comment on attachment 8642210 [details] [diff] [review] 1185388.patch Review of attachment 8642210 [details] [diff] [review]: ----------------------------------------------------------------- ::: media/gmp-clearkey/0.1/WMFUtils.cpp @@ +257,5 @@ > > +static int32_t > +ComputeNumThreads() > +{ > + SYSTEM_INFO sysInfo; Use the aCoreCount argument passed to VideoDecoder::InitDecode instead of Win32 APIs here so there's no risk of the sandbox breaking this and so that Firefox can control this.
Attachment #8642210 - Flags: review?(cpearce) → review-
Attachment #8642210 - Attachment is obsolete: true
Comment on attachment 8642632 [details] [diff] [review] 1185388.patch Review of attachment 8642632 [details] [diff] [review]: ----------------------------------------------------------------- ::: media/gmp-clearkey/0.1/WMFUtils.cpp @@ +256,5 @@ > > +int32_t > +GetNumThreads(int32_t aCoreCount) > +{ > + return aCoreCount > 4 ? -1 : (std::max)(aCoreCount - 1, 1); Nit: Do you need the "()" around (std::max)? i.e. can this be: std::max(aCoreCount - 1, 1); ?
Attachment #8642632 - Flags: review?(cpearce) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: