Bug 1603621 - Expose partial present usage to about:support r=nical

Differential Revision: https://phabricator.services.mozilla.com/D57074

--HG--
extra : moz-landing-system : lando
This commit is contained in:
sotaro 2019-12-13 13:27:14 +00:00
Родитель e0d7403f69
Коммит bf42ee0e77
2 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -27,6 +27,7 @@ namespace gfx {
_(WEBRENDER, Feature, "WebRender") \
_(WEBRENDER_QUALIFIED, Feature, "WebRender qualified") \
_(WEBRENDER_COMPOSITOR, Feature, "WebRender native compositor") \
_(WEBRENDER_PARTIAL, Feature, "WebRender partial present") \
_(OMTP, Feature, "Off Main Thread Painting") \
_(ADVANCED_LAYERS, Feature, "Advanced Layers") \
_(WEBGPU, Feature, "WebGPU") \

Просмотреть файл

@ -3331,6 +3331,20 @@ void gfxPlatform::InitWebRenderConfig() {
featureComp.UserEnable("Enabled");
}
// Initialize WebRender partial present config.
// It is used only for reporting to Decision Log.
if (StaticPrefs::gfx_webrender_max_partial_present_rects_AtStartup() > 0) {
// Partial present is used only when WebRender compositor is not used.
if (UseWebRender() && !gfxVars::UseWebRenderCompositor()) {
FeatureState& featurePartial =
gfxConfig::GetFeature(Feature::WEBRENDER_PARTIAL);
featurePartial.EnableByDefault();
// Call UserEnable() only for reporting to Decision Log.
// If feature is enabled by default. It is not reported to Decision Log.
featurePartial.UserEnable("Enabled");
}
}
// Set features that affect WR's RendererOptions
gfxVars::SetUseGLSwizzle(
IsFeatureSupported(nsIGfxInfo::FEATURE_GL_SWIZZLE, true));