Bug 1337085 - Add a gfxVar to control whether or not webrender is enabled. r=sotaro

MozReview-Commit-ID: 8Ebc0DbhYbZ
This commit is contained in:
Kartikaya Gupta
2017-02-06 22:22:36 -05:00
parent 839743af59
commit 531c45795f
3 changed files with 15 additions and 5 deletions

View File

@@ -64,6 +64,7 @@
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/TabParent.h"
#include "mozilla/gfx/GPUProcessManager.h"
#include "mozilla/gfx/gfxVars.h"
#include "mozilla/Move.h"
#include "mozilla/Services.h"
#include "mozilla/Sprintf.h"
@@ -1300,11 +1301,7 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
CreateCompositorVsyncDispatcher();
// For now we decide whether or not to enable WR on this widget by the current
// value of the pref (this is the only place in the code allowed to check the
// value of the pref). We might want to change this eventually and drop the
// pref entirely.
bool enableWR = Preferences::GetBool("gfx.webrender.enabled", false);
bool enableWR = gfx::gfxVars::UseWebRender();
bool enableAPZ = UseAPZ();
if (enableWR && !gfxPrefs::APZAllowWithWebRender()) {
// Disable APZ on widgets using WebRender, since it doesn't work yet. Allow