forked from mirrors/gecko-dev
Bug 1604380 - Disable partial present when picture caching is disabled r=gw
Partial present does not work when WR picture caching is disabled. Differential Revision: https://phabricator.services.mozilla.com/D57416 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
c0e95a6f66
commit
a5ce70d85a
3 changed files with 16 additions and 8 deletions
|
|
@ -45,6 +45,7 @@ class gfxVarReceiver;
|
|||
_(UseWebRenderTripleBufferingWin, bool, false) \
|
||||
_(UseWebRenderCompositor, bool, false) \
|
||||
_(UseWebRenderProgramBinaryDisk, bool, false) \
|
||||
_(WebRenderMaxPartialPresentRects, int32_t, 0) \
|
||||
_(WebRenderDebugFlags, int32_t, 0) \
|
||||
_(ScreenDepth, int32_t, 0) \
|
||||
_(GREDirectory, nsString, nsString()) \
|
||||
|
|
|
|||
|
|
@ -3342,16 +3342,23 @@ void gfxPlatform::InitWebRenderConfig() {
|
|||
}
|
||||
|
||||
// Initialize WebRender partial present config.
|
||||
// It is used only for reporting to Decision Log.
|
||||
// Partial present is used only when WebRender compositor is not used.
|
||||
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()) {
|
||||
if (UseWebRender()) {
|
||||
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");
|
||||
if (StaticPrefs::gfx_webrender_picture_caching()) {
|
||||
gfxVars::SetWebRenderMaxPartialPresentRects(
|
||||
StaticPrefs::gfx_webrender_max_partial_present_rects_AtStartup());
|
||||
// Call UserEnable() only for reporting to Decision Log.
|
||||
// If feature is enabled by default. It is not reported to Decision Log.
|
||||
featurePartial.UserEnable("Enabled");
|
||||
} else {
|
||||
featurePartial.ForceDisable(
|
||||
FeatureStatus::Unavailable, "Picture caching is disabled",
|
||||
NS_LITERAL_CSTRING("FEATURE_FAILURE_PICTURE_CACHING_DISABLED"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -777,7 +777,7 @@ void RenderCompositorANGLE::AddSurface(wr::NativeSurfaceId aId,
|
|||
void RenderCompositorANGLE::InitializeUsePartialPresent() {
|
||||
if (UseCompositor() || !mSwapChain1 ||
|
||||
mWidget->AsWindows()->HasFxrOutputHandler() ||
|
||||
StaticPrefs::gfx_webrender_max_partial_present_rects_AtStartup() <= 0) {
|
||||
gfx::gfxVars::WebRenderMaxPartialPresentRects() <= 0) {
|
||||
mUsePartialPresent = false;
|
||||
} else {
|
||||
mUsePartialPresent = true;
|
||||
|
|
@ -792,7 +792,7 @@ uint32_t RenderCompositorANGLE::GetMaxPartialPresentRects() {
|
|||
if (!mUsePartialPresent) {
|
||||
return 0;
|
||||
}
|
||||
return StaticPrefs::gfx_webrender_max_partial_present_rects_AtStartup();
|
||||
return gfx::gfxVars::WebRenderMaxPartialPresentRects();
|
||||
}
|
||||
|
||||
bool RenderCompositorANGLE::MaybeReadback(
|
||||
|
|
|
|||
Loading…
Reference in a new issue