Bug 1494994 - Disable WebRender when recording/replaying, r=nical.
authorBrian Hackett <bhackett1024@gmail.com>
Tue, 09 Oct 2018 14:31:49 -1000
changeset 498950 d85e5fb4421c39a263ea1268f39804a6c91f0bee
parent 498949 eff92a00f2d86994ecc2fd5c80e13e958b7b45b4
child 498951 70309e4922792813c18320b1fdd64a5ef688feab
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1494994
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1494994 - Disable WebRender when recording/replaying, r=nical.
gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2675,16 +2675,22 @@ gfxPlatform::InitWebRenderConfig()
   //   WR? WR+   => means WR was enabled via gfx.webrender.all.qualified
   //   WR! WR+   => means WR was enabled via gfx.webrender.{all,enabled} or envvar
   // On Beta/Release:
   //   WR? WR+   => means WR was enabled via gfx.webrender.all.qualified on qualified hardware
   //   WR! WR+   => means WR was enabled via envvar, possibly on unqualified hardware.
   // In all cases WR- means WR was not enabled, for one of many possible reasons.
   ScopedGfxFeatureReporter reporter("WR", prefEnabled || envvarEnabled);
   if (!XRE_IsParentProcess()) {
+    // Force-disable WebRender in recording/replaying child processes, which
+    // have their own compositor.
+    if (recordreplay::IsRecordingOrReplaying()) {
+      gfxVars::SetUseWebRender(false);
+    }
+
     // The parent process runs through all the real decision-making code
     // later in this function. For other processes we still want to report
     // the state of the feature for crash reports.
     if (gfxVars::UseWebRender()) {
       reporter.SetSuccessful();
     }
     return;
   }