зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset eae66c448e16 (bug 1777927) for causing failures at test_gfxBlacklist_Version.js. CLOSED TREE
This commit is contained in:
Родитель
bf8e6bd398
Коммит
071d1fd9a9
|
@ -2351,11 +2351,9 @@ void gfxPlatform::InitAcceleration() {
|
||||||
// explicit.
|
// explicit.
|
||||||
MOZ_ASSERT(NS_IsMainThread(), "can only initialize prefs on the main thread");
|
MOZ_ASSERT(NS_IsMainThread(), "can only initialize prefs on the main thread");
|
||||||
|
|
||||||
#ifndef MOZ_WIDGET_GTK
|
|
||||||
nsCOMPtr<nsIGfxInfo> gfxInfo = components::GfxInfo::Service();
|
nsCOMPtr<nsIGfxInfo> gfxInfo = components::GfxInfo::Service();
|
||||||
nsCString discardFailureId;
|
nsCString discardFailureId;
|
||||||
int32_t status;
|
int32_t status;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (XRE_IsParentProcess()) {
|
if (XRE_IsParentProcess()) {
|
||||||
gfxVars::SetBrowserTabsRemoteAutostart(BrowserTabsRemoteAutostart());
|
gfxVars::SetBrowserTabsRemoteAutostart(BrowserTabsRemoteAutostart());
|
||||||
|
@ -2380,29 +2378,27 @@ void gfxPlatform::InitAcceleration() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StaticPrefs::media_hardware_video_decoding_enabled_AtStartup()) {
|
if (Preferences::GetBool("media.hardware-video-decoding.enabled", false) &&
|
||||||
#ifdef MOZ_WIDGET_GTK
|
|
||||||
sLayersSupportsHardwareVideoDecoding =
|
|
||||||
gfxPlatformGtk::GetPlatform()->InitVAAPIConfig(
|
|
||||||
StaticPrefs::
|
|
||||||
media_hardware_video_decoding_force_enabled_AtStartup() ||
|
|
||||||
StaticPrefs::media_ffmpeg_vaapi_enabled());
|
|
||||||
#else
|
|
||||||
if (
|
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
Preferences::GetBool("media.wmf.dxva.enabled", true) &&
|
Preferences::GetBool("media.wmf.dxva.enabled", true) &&
|
||||||
#endif
|
#endif
|
||||||
NS_SUCCEEDED(gfxInfo->GetFeatureStatus(
|
NS_SUCCEEDED(
|
||||||
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, discardFailureId,
|
gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING,
|
||||||
&status))) {
|
discardFailureId, &status))) {
|
||||||
if (status == nsIGfxInfo::FEATURE_STATUS_OK ||
|
if (status == nsIGfxInfo::FEATURE_STATUS_OK ||
|
||||||
StaticPrefs::
|
#ifdef MOZ_WAYLAND
|
||||||
media_hardware_video_decoding_force_enabled_AtStartup()) {
|
StaticPrefs::media_ffmpeg_vaapi_enabled() ||
|
||||||
|
#endif
|
||||||
|
StaticPrefs::media_hardware_video_decoding_force_enabled_AtStartup()) {
|
||||||
sLayersSupportsHardwareVideoDecoding = true;
|
sLayersSupportsHardwareVideoDecoding = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MOZ_WAYLAND
|
||||||
|
sLayersSupportsHardwareVideoDecoding =
|
||||||
|
gfxPlatformGtk::GetPlatform()->InitVAAPIConfig(
|
||||||
|
sLayersSupportsHardwareVideoDecoding);
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
sLayersAccelerationPrefsInitialized = true;
|
sLayersAccelerationPrefsInitialized = true;
|
||||||
|
|
||||||
|
|
|
@ -225,16 +225,12 @@ void gfxPlatformGtk::InitDmabufConfig() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gfxPlatformGtk::InitVAAPIConfig(bool aForceEnabledByUser) {
|
bool gfxPlatformGtk::InitVAAPIConfig(bool aEnabledByPlatform) {
|
||||||
FeatureState& feature =
|
FeatureState& feature =
|
||||||
gfxConfig::GetFeature(Feature::HARDWARE_VIDEO_DECODING);
|
gfxConfig::GetFeature(Feature::HARDWARE_VIDEO_DECODING);
|
||||||
#ifdef MOZ_WAYLAND
|
#ifdef MOZ_WAYLAND
|
||||||
feature.EnableByDefault();
|
feature.EnableByDefault();
|
||||||
|
|
||||||
if (aForceEnabledByUser) {
|
|
||||||
feature.UserForceEnable("Force enabled by pref");
|
|
||||||
}
|
|
||||||
|
|
||||||
nsCString failureId;
|
nsCString failureId;
|
||||||
int32_t status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
|
int32_t status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
|
||||||
nsCOMPtr<nsIGfxInfo> gfxInfo = components::GfxInfo::Service();
|
nsCOMPtr<nsIGfxInfo> gfxInfo = components::GfxInfo::Service();
|
||||||
|
@ -242,14 +238,16 @@ bool gfxPlatformGtk::InitVAAPIConfig(bool aForceEnabledByUser) {
|
||||||
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, failureId, &status))) {
|
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, failureId, &status))) {
|
||||||
feature.Disable(FeatureStatus::BlockedNoGfxInfo, "gfxInfo is broken",
|
feature.Disable(FeatureStatus::BlockedNoGfxInfo, "gfxInfo is broken",
|
||||||
"FEATURE_FAILURE_NO_GFX_INFO"_ns);
|
"FEATURE_FAILURE_NO_GFX_INFO"_ns);
|
||||||
} else if (status == nsIGfxInfo::FEATURE_BLOCKED_PLATFORM_TEST) {
|
|
||||||
feature.ForceDisable(FeatureStatus::Unavailable,
|
|
||||||
"Force disabled by gfxInfo", failureId);
|
|
||||||
} else if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
|
} else if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
|
||||||
feature.Disable(FeatureStatus::Blocklisted, "Blocklisted by gfxInfo",
|
feature.Disable(FeatureStatus::Blocklisted, "Blocklisted by gfxInfo",
|
||||||
failureId);
|
failureId);
|
||||||
}
|
}
|
||||||
|
if (status != nsIGfxInfo::FEATURE_STATUS_OK && aEnabledByPlatform) {
|
||||||
|
feature.UserForceEnable("Force enabled by pref");
|
||||||
|
}
|
||||||
|
if (!aEnabledByPlatform) {
|
||||||
|
feature.Disable(FeatureStatus::Blocked, "Blocked by platform", failureId);
|
||||||
|
}
|
||||||
if (!gfxVars::UseEGL()) {
|
if (!gfxVars::UseEGL()) {
|
||||||
feature.ForceDisable(FeatureStatus::Unavailable, "Requires EGL",
|
feature.ForceDisable(FeatureStatus::Unavailable, "Requires EGL",
|
||||||
"FEATURE_FAILURE_REQUIRES_EGL"_ns);
|
"FEATURE_FAILURE_REQUIRES_EGL"_ns);
|
||||||
|
|
|
@ -68,7 +68,7 @@ class gfxPlatformGtk final : public gfxPlatform {
|
||||||
protected:
|
protected:
|
||||||
void InitX11EGLConfig();
|
void InitX11EGLConfig();
|
||||||
void InitDmabufConfig();
|
void InitDmabufConfig();
|
||||||
bool InitVAAPIConfig(bool aForceEnabledByUser);
|
bool InitVAAPIConfig(bool aEnabledByPlatform);
|
||||||
void InitPlatformGPUProcessPrefs() override;
|
void InitPlatformGPUProcessPrefs() override;
|
||||||
void InitWebRenderConfig() override;
|
void InitWebRenderConfig() override;
|
||||||
bool CheckVariationFontSupport() override;
|
bool CheckVariationFontSupport() override;
|
||||||
|
|
|
@ -9385,11 +9385,6 @@
|
||||||
value: false
|
value: false
|
||||||
mirror: always
|
mirror: always
|
||||||
|
|
||||||
- name: media.hardware-video-decoding.enabled
|
|
||||||
type: bool
|
|
||||||
value: true
|
|
||||||
mirror: once
|
|
||||||
|
|
||||||
- name: media.hardware-video-decoding.force-enabled
|
- name: media.hardware-video-decoding.force-enabled
|
||||||
type: bool
|
type: bool
|
||||||
value: false
|
value: false
|
||||||
|
|
|
@ -256,6 +256,8 @@ pref("media.volume_scale", "1.0");
|
||||||
// opened as top-level documents, as opposed to inside a media element.
|
// opened as top-level documents, as opposed to inside a media element.
|
||||||
pref("media.play-stand-alone", true);
|
pref("media.play-stand-alone", true);
|
||||||
|
|
||||||
|
pref("media.hardware-video-decoding.enabled", true);
|
||||||
|
|
||||||
#ifdef MOZ_WMF
|
#ifdef MOZ_WMF
|
||||||
pref("media.wmf.dxva.enabled", true);
|
pref("media.wmf.dxva.enabled", true);
|
||||||
pref("media.wmf.play-stand-alone", true);
|
pref("media.wmf.play-stand-alone", true);
|
||||||
|
|
|
@ -1008,7 +1008,7 @@ nsresult GfxInfo::GetFeatureStatusImpl(
|
||||||
|
|
||||||
if (aFeature == nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING &&
|
if (aFeature == nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING &&
|
||||||
!mIsVAAPISupported) {
|
!mIsVAAPISupported) {
|
||||||
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_PLATFORM_TEST;
|
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
|
||||||
aFailureId = "FEATURE_FAILURE_VIDEO_DECODING_TEST_FAILED";
|
aFailureId = "FEATURE_FAILURE_VIDEO_DECODING_TEST_FAILED";
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,8 +207,6 @@ interface nsIGfxInfo : nsISupports
|
||||||
const long FEATURE_ALLOW_ALWAYS = 9;
|
const long FEATURE_ALLOW_ALWAYS = 9;
|
||||||
/* This feature is safe to be on this device due to the allowlist, depending on qualified/experiment status. */
|
/* This feature is safe to be on this device due to the allowlist, depending on qualified/experiment status. */
|
||||||
const long FEATURE_ALLOW_QUALIFIED = 10;
|
const long FEATURE_ALLOW_QUALIFIED = 10;
|
||||||
/* This feature failed in a startup test, e.g. due to a crashing driver. */
|
|
||||||
const long FEATURE_BLOCKED_PLATFORM_TEST = 11;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ask about a feature, and return the status of that feature.
|
* Ask about a feature, and return the status of that feature.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче