diff options
author | Leorize <alaviss@users.noreply.github.com> | 2018-09-24 08:26:53 +0700 |
---|---|---|
committer | Leorize <alaviss@users.noreply.github.com> | 2018-09-25 14:55:50 +0700 |
commit | 1c159bf4dc4885e85bcff4099168a35b18848a92 (patch) | |
tree | 96cc27412e2883d5fddeb10498eb0f693c22b0a1 | |
parent | 8d3931df24d84194bbab474f6618e63eb4fd603b (diff) | |
download | uxp-1c159bf4dc4885e85bcff4099168a35b18848a92.tar.gz |
gfx: add pref for enabling APZ without e10s
-rw-r--r-- | gfx/thebes/gfxPlatform.cpp | 10 | ||||
-rw-r--r-- | gfx/thebes/gfxPrefs.h | 1 | ||||
-rw-r--r-- | modules/libpref/init/all.js | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index d5af16a196..65227a8a7b 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -2380,13 +2380,13 @@ gfxPlatform::AsyncPanZoomEnabled() { #if !defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_WIDGET_UIKIT) // For XUL applications (everything but Firefox on Android) we only want - // to use APZ when E10S is enabled. If we ever get input events off the - // main thread we can consider relaxing this requirement. - if (!BrowserTabsRemoteAutostart()) { + // to use APZ when E10S is enabled or when the user explicitly enable it. + if (BrowserTabsRemoteAutostart() || gfxPrefs::APZDesktopEnabled()) { + return gfxPrefs::AsyncPanZoomEnabledDoNotUseDirectly(); + } else { return false; } -#endif -#ifdef MOZ_WIDGET_ANDROID +#elif defined(MOZ_WIDGET_ANDROID) return true; #else return gfxPrefs::AsyncPanZoomEnabledDoNotUseDirectly(); diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index 359a258c7c..1253fdb488 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -310,6 +310,7 @@ private: DECL_GFX_PREF(Live, "apz.y_stationary_size_multiplier", APZYStationarySizeMultiplier, float, 3.5f); DECL_GFX_PREF(Live, "apz.zoom_animation_duration_ms", APZZoomAnimationDuration, int32_t, 250); DECL_GFX_PREF(Live, "apz.scale_repaint_delay_ms", APZScaleRepaintDelay, int32_t, 500); + DECL_GFX_PREF(Once, "apz.desktop.enabled", APZDesktopEnabled, bool, false); DECL_GFX_PREF(Live, "browser.ui.zoom.force-user-scalable", ForceUserScalable, bool, false); DECL_GFX_PREF(Live, "browser.viewport.desktopWidth", DesktopViewportWidth, int32_t, 980); diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 0ec5f15961..49795d0e36 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -705,6 +705,10 @@ pref("apz.y_skate_size_multiplier", "1.5"); pref("apz.y_stationary_size_multiplier", "1.5"); #endif +#if !defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_WIDGET_UIKIT) +pref("apz.desktop.enabled", false); +#endif + #ifdef XP_MACOSX // Whether to run in native HiDPI mode on machines with "Retina"/HiDPI display; // <= 0 : hidpi mode disabled, display will just use pixel-based upscaling |