Bug 1178385. Add a pref to force enable hw video decode. r=milan

This commit is contained in:
Jeff Muizelaar 2016-01-27 19:31:42 -05:00
parent 0c79bb0ea3
commit 4e3f56f951
3 changed files with 6 additions and 2 deletions

View File

@ -1965,8 +1965,8 @@ InitLayersAccelerationPrefs()
#endif
NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
&status))) {
if (status == nsIGfxInfo::FEATURE_STATUS_OK) {
sLayersSupportsHardwareVideoDecoding = true;
if (status == nsIGfxInfo::FEATURE_STATUS_OK || gfxPrefs::HardwareVideoDecodingForceEnabled()) {
sLayersSupportsHardwareVideoDecoding = true;
}
}

View File

@ -441,6 +441,9 @@ private:
DECL_GFX_PREF(Live, "webgl.webgl2-compat-mode", WebGL2CompatMode, bool, false);
DECL_GFX_PREF(Once, "media.hardware-video-decoding.force-enabled",
HardwareVideoDecodingForceEnabled, bool, false);
// WARNING:
// Please make sure that you've added your new preference to the list above in alphabetical order.
// Please do not just append it to the end of the list.

View File

@ -309,6 +309,7 @@ pref("media.play-stand-alone", true);
pref("media.block-play-until-visible", false);
pref("media.hardware-video-decoding.enabled", true);
pref("media.hardware-video-decoding.force-enabled", false);
pref("media.decoder.heuristic.dormant.enabled", true);
pref("media.decoder.heuristic.dormant.timeout", 60000);