WebRender preference (gfx.webrender.enable, false by default)

This commit is contained in:
wuggy 2026-09-17 23:27:05 -07:00
commit 1190eb1c6a
3 changed files with 7 additions and 1 deletions

View file

@ -14,6 +14,7 @@
#include "mozilla/layers/CompositorTypes.h" // for DiagnosticFlags::COLOR
#include "mozilla/layers/Effects.h" // for Effect, EffectChain, etc
#include "mozilla/mozalloc.h" // for operator delete, etc
#include "gfxPrefs.h" // for gfxPrefs::WebRenderEnabled
namespace mozilla {
namespace layers {
@ -34,7 +35,7 @@ ColorLayerComposite::RenderLayer(const IntRect& aClipRect)
// Masked or 3D layers continue through the established effect path until
// equivalent WebRender primitives are available for those cases.
CompositorOGL* compositorOGL = mCompositor->AsCompositorOGL();
if (compositorOGL &&
if (gfxPrefs::WebRenderEnabled() && compositorOGL &&
!effectChain.mSecondaryEffects[EffectTypes::MASK] &&
GetEffectiveMixBlendMode() == CompositionOp::OP_OVER &&
transform.Is2D() && !clipRect.IsEmpty()) {

View file

@ -409,6 +409,8 @@ private:
DECL_GFX_PREF(Once, "gfx.use-iosurface-textures", UseIOSurfaceTextures, bool, false);
DECL_GFX_PREF(Live, "gfx.webrender.enabled", WebRenderEnabled, bool, false);
// These times should be in milliseconds
DECL_GFX_PREF(Once, "gfx.touch.resample.delay-threshold", TouchResampleVsyncDelayThreshold, int32_t, 20);
DECL_GFX_PREF(Once, "gfx.touch.resample.max-predict", TouchResampleMaxPredict, int32_t, 8);

View file

@ -727,6 +727,9 @@ pref("layout.scroll.root-frame-containers", false);
pref("gfx.layerscope.enabled", false);
pref("gfx.layerscope.port", 23456);
// Enable the incremental C WebRender path for supported compositor primitives.
pref("gfx.webrender.enabled", false);
// Log severe performance warnings to the error console and profiles.
// This should be use to quickly find which slow paths are used by test cases.
pref("gfx.perf-warnings.enabled", false);