Bug 1960326 [Wayland] Enable native compositor at gfxConfigManager::Init() for HDR mode r=lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D245414
This commit is contained in:
stransky
2025-04-14 18:45:34 +00:00
parent b350980669
commit e06eace151
2 changed files with 4 additions and 3 deletions

View File

@@ -32,7 +32,11 @@ void gfxConfigManager::Init() {
mWrForceEnabled = gfxPlatform::WebRenderPrefEnabled();
mWrSoftwareForceEnabled = StaticPrefs::gfx_webrender_software_AtStartup();
mWrCompositorForceEnabled =
#ifdef MOZ_WAYLAND
StaticPrefs::gfx_wayland_hdr_AtStartup();
#else
StaticPrefs::gfx_webrender_compositor_force_enabled_AtStartup();
#endif
mGPUProcessAllowSoftware =
StaticPrefs::layers_gpu_process_allow_software_AtStartup();
mWrForcePartialPresent =

View File

@@ -322,9 +322,6 @@ void gfxPlatformGtk::InitWebRenderConfig() {
FeatureState& feature = gfxConfig::GetFeature(Feature::WEBRENDER_COMPOSITOR);
// HDR requires compositor to work
#if defined(MOZ_WAYLAND)
if (StaticPrefs::gfx_wayland_hdr_AtStartup()) {
feature.UserForceEnable("Requested for HDR");
}
if (feature.IsEnabled()) {
if (!StaticPrefs::gfx_wayland_hdr_AtStartup()) {
feature.ForceDisable(FeatureStatus::Unavailable, "HDR mode is disabled",