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
parent e0d7403f69
commit bf42ee0e77
2 changed files with 15 additions and 0 deletions

View File

@ -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") \

View File

@ -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));