Bug 1364987 - Remove the pref to allow APZ with webrender. r?rhunt draft
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 16 May 2017 09:43:36 -0400
changeset 578782 991e834189bba6cb5e4426142059e9c04296941d
parent 578781 b9a4a6e2292e923684c2d25b78addaca23c6abd5
child 628832 61244d705c9168665199371944eeddbc49441dc1
push id59055
push userkgupta@mozilla.com
push dateTue, 16 May 2017 13:43:53 +0000
reviewersrhunt
bugs1364987
milestone55.0a1
Bug 1364987 - Remove the pref to allow APZ with webrender. r?rhunt People seem to be turning on this pref in the wild and generating crash reports which are wasting time and energy of people who have better things to do. MozReview-Commit-ID: 5VfjKaDluYJ
gfx/thebes/gfxPrefs.h
modules/libpref/init/all.js
widget/nsBaseWidget.cpp
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -277,17 +277,16 @@ private:
 
   // This is where DECL_GFX_PREF for each of the preferences should go.
   // We will keep these in an alphabetical order to make it easier to see if
   // a method accessing a pref already exists. Just add yours in the list.
 
   // The apz prefs are explained in AsyncPanZoomController.cpp
   DECL_GFX_PREF(Live, "apz.allow_checkerboarding",             APZAllowCheckerboarding, bool, true);
   DECL_GFX_PREF(Live, "apz.allow_immediate_handoff",           APZAllowImmediateHandoff, bool, true);
-  DECL_GFX_PREF(Once, "apz.allow_with_webrender",              APZAllowWithWebRender, bool, false);
   DECL_GFX_PREF(Live, "apz.allow_zooming",                     APZAllowZooming, bool, false);
   DECL_GFX_PREF(Live, "apz.axis_lock.breakout_angle",          APZAxisBreakoutAngle, float, float(M_PI / 8.0) /* 22.5 degrees */);
   DECL_GFX_PREF(Live, "apz.axis_lock.breakout_threshold",      APZAxisBreakoutThreshold, float, 1.0f / 32.0f);
   DECL_GFX_PREF(Live, "apz.axis_lock.direct_pan_angle",        APZAllowedDirectPanAngle, float, float(M_PI / 3.0) /* 60 degrees */);
   DECL_GFX_PREF(Live, "apz.axis_lock.lock_angle",              APZAxisLockAngle, float, float(M_PI / 6.0) /* 30 degrees */);
   DECL_GFX_PREF(Live, "apz.axis_lock.mode",                    APZAxisLockMode, int32_t, 0);
   DECL_GFX_PREF(Live, "apz.content_response_timeout",          APZContentResponseTimeout, int32_t, 400);
   DECL_GFX_PREF(Live, "apz.danger_zone_x",                     APZDangerZoneX, int32_t, 50);
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -628,17 +628,16 @@ pref("layers.geometry.basic.enabled", tr
 
 // Whether to enable arbitrary layer geometry for DirectX compositor
 pref("layers.geometry.d3d11.enabled", true);
 
 // APZ preferences. For documentation/details on what these prefs do, check
 // gfx/layers/apz/src/AsyncPanZoomController.cpp.
 pref("apz.allow_checkerboarding", true);
 pref("apz.allow_immediate_handoff", true);
-pref("apz.allow_with_webrender", false);
 pref("apz.allow_zooming", false);
 
 // Whether to lock touch scrolling to one axis at a time
 // 0 = FREE (No locking at all)
 // 1 = STANDARD (Once locked, remain locked until scrolling ends)
 // 2 = STICKY (Allow lock to be broken, with hysteresis)
 pref("apz.axis_lock.mode", 0);
 pref("apz.axis_lock.lock_angle", "0.5235987");        // PI / 6 (30 degrees)
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -1250,19 +1250,18 @@ void nsBaseWidget::CreateCompositor(int 
   if (!mShutdownObserver) {
     return;
   }
 
   CreateCompositorVsyncDispatcher();
 
   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
-    // it on non-WR widgets or if the pref forces it on.
+  if (enableWR) {
+    // Disable APZ on widgets using WebRender, since it doesn't work yet.
     enableAPZ = false;
   }
   CompositorOptions options(enableAPZ, enableWR);
 
   RefPtr<LayerManager> lm;
   if (options.UseWebRender()) {
     lm = new WebRenderLayerManager(this);
   } else {