diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-27 11:49:31 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-27 11:49:31 +0100 |
commit | 71416f9b79e10559f412d8b03eb65446693d8ae1 (patch) | |
tree | 1126c76cefbf8c3fbfdfd153c3650fe457e6825a | |
parent | d56573bb9c88295d9bd6d86658c4124c0c4b3e2d (diff) | |
parent | 90773547e74b5c03a5bb60b9c156f987c73b3dcc (diff) | |
download | uxp-71416f9b79e10559f412d8b03eb65446693d8ae1.tar.gz |
Merge branch '1360'
-rw-r--r-- | gfx/thebes/gfxAndroidPlatform.h | 5 | ||||
-rw-r--r-- | gfx/thebes/gfxPlatform.cpp | 41 | ||||
-rw-r--r-- | gfx/thebes/gfxPlatform.h | 2 | ||||
-rw-r--r-- | gfx/thebes/gfxPlatformGtk.h | 4 | ||||
-rw-r--r-- | gfx/thebes/gfxPlatformMac.cpp | 6 | ||||
-rw-r--r-- | gfx/thebes/gfxPlatformMac.h | 3 | ||||
-rw-r--r-- | gfx/thebes/gfxPrefs.h | 4 | ||||
-rw-r--r-- | gfx/thebes/gfxWindowsPlatform.h | 3 | ||||
-rw-r--r-- | layout/base/crashtests/crashtests.list | 2 | ||||
-rw-r--r-- | layout/tools/reftest/reftestcommandline.py | 3 | ||||
-rw-r--r-- | layout/tools/reftest/runreftest.py | 5 | ||||
-rw-r--r-- | modules/libpref/init/all.js | 23 | ||||
-rw-r--r-- | testing/mochitest/runtests.py | 5 | ||||
-rw-r--r-- | testing/mozharness/configs/unittests/linux_unittest.py | 3 | ||||
-rw-r--r-- | testing/mozharness/configs/unittests/win_taskcluster_unittest.py | 2 | ||||
-rw-r--r-- | testing/mozharness/configs/unittests/win_unittest.py | 2 | ||||
-rw-r--r-- | testing/talos/talos/test.py | 4 | ||||
-rw-r--r-- | testing/talos/talos/ttest.py | 2 | ||||
-rw-r--r-- | testing/testsuite-targets.mk | 4 | ||||
-rw-r--r-- | testing/web-platform/harness/wptrunner/browsers/firefox.py | 5 |
20 files changed, 29 insertions, 99 deletions
diff --git a/gfx/thebes/gfxAndroidPlatform.h b/gfx/thebes/gfxAndroidPlatform.h index 30e7c89bab..8975d0ab96 100644 --- a/gfx/thebes/gfxAndroidPlatform.h +++ b/gfx/thebes/gfxAndroidPlatform.h @@ -72,11 +72,6 @@ public: return true; } -protected: - bool AccelerateLayersByDefault() override { - return true; - } - private: gfxImageFormat mOffscreenFormat; }; diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 50d1fcb465..4cd044f904 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -571,40 +571,6 @@ gfxPlatform::Init() } } - // Drop a note in the crash report if we end up forcing an option that could - // destabilize things. New items should be appended at the end (of an existing - // or in a new section), so that we don't have to know the version to interpret - // these cryptic strings. - { - nsAutoCString forcedPrefs; - // D2D prefs - forcedPrefs.AppendPrintf("FP(D%d%d", - gfxPrefs::Direct2DDisabled(), - gfxPrefs::Direct2DForceEnabled()); - // Layers prefs - forcedPrefs.AppendPrintf("-L%d%d%d%d", - gfxPrefs::LayersAMDSwitchableGfxEnabled(), - gfxPrefs::LayersAccelerationDisabledDoNotUseDirectly(), - gfxPrefs::LayersAccelerationForceEnabledDoNotUseDirectly(), - gfxPrefs::LayersD3D11ForceWARP()); - // WebGL prefs - forcedPrefs.AppendPrintf("-W%d%d%d%d%d%d%d%d", - gfxPrefs::WebGLANGLEForceD3D11(), - gfxPrefs::WebGLANGLEForceWARP(), - gfxPrefs::WebGLDisabled(), - gfxPrefs::WebGLDisableANGLE(), - gfxPrefs::WebGLDXGLEnabled(), - gfxPrefs::WebGLForceEnabled(), - gfxPrefs::WebGLForceLayersReadback(), - gfxPrefs::WebGLForceMSAA()); - // Prefs that don't fit into any of the other sections - forcedPrefs.AppendPrintf("-T%d%d%d%d) ", - gfxPrefs::AndroidRGB16Force(), - gfxPrefs::CanvasAzureAccelerated(), - gfxPrefs::DisableGralloc(), - gfxPrefs::ForceShmemTiles()); - } - InitMoz2DLogging(); gGfxPlatformPrefsLock = new Mutex("gfxPlatform::gGfxPlatformPrefsLock"); @@ -2171,7 +2137,7 @@ gfxPlatform::InitCompositorAccelerationPrefs() FeatureStatus::Blocked, "Acceleration blocked by platform")) { - if (gfxPrefs::LayersAccelerationDisabledDoNotUseDirectly()) { + if (!gfxPrefs::LayersAccelerationEnabledDoNotUseDirectly()) { feature.UserDisable("Disabled by pref", NS_LITERAL_CSTRING("FEATURE_FAILURE_COMP_PREF")); } else if (acceleratedEnv && *acceleratedEnv == '0') { @@ -2185,8 +2151,9 @@ gfxPlatform::InitCompositorAccelerationPrefs() } // This has specific meaning elsewhere, so we always record it. - if (gfxPrefs::LayersAccelerationForceEnabledDoNotUseDirectly()) { - feature.UserForceEnable("Force-enabled by pref"); + if (gfxPrefs::LayersAccelerationEnabledDoNotUseDirectly() && + gfxPrefs::LayersAccelerationForceEnabledDoNotUseDirectly()) { + feature.UserForceEnable("Force-enabled by prefs"); } // Safe mode trumps everything. diff --git a/gfx/thebes/gfxPlatform.h b/gfx/thebes/gfxPlatform.h index 68bb99ea44..642cf909f4 100644 --- a/gfx/thebes/gfxPlatform.h +++ b/gfx/thebes/gfxPlatform.h @@ -698,7 +698,7 @@ protected: virtual already_AddRefed<mozilla::gfx::VsyncSource> CreateHardwareVsyncSource(); // Returns whether or not layers should be accelerated by default on this platform. - virtual bool AccelerateLayersByDefault(); + bool AccelerateLayersByDefault(); // Returns a prioritized list of available compositor backends for acceleration. virtual void GetAcceleratedCompositorBackends(nsTArray<mozilla::layers::LayersBackend>& aBackends); diff --git a/gfx/thebes/gfxPlatformGtk.h b/gfx/thebes/gfxPlatformGtk.h index 9959c0e13d..22ed4b08fd 100644 --- a/gfx/thebes/gfxPlatformGtk.h +++ b/gfx/thebes/gfxPlatformGtk.h @@ -132,10 +132,6 @@ public: return true; } - bool AccelerateLayersByDefault() override { - return true; - } - #ifdef GL_PROVIDER_GLX already_AddRefed<mozilla::gfx::VsyncSource> CreateHardwareVsyncSource() override; #endif diff --git a/gfx/thebes/gfxPlatformMac.cpp b/gfx/thebes/gfxPlatformMac.cpp index 79684dd19a..75c5236a87 100644 --- a/gfx/thebes/gfxPlatformMac.cpp +++ b/gfx/thebes/gfxPlatformMac.cpp @@ -372,12 +372,6 @@ gfxPlatformMac::ReadAntiAliasingThreshold() return threshold; } -bool -gfxPlatformMac::AccelerateLayersByDefault() -{ - return true; -} - // This is the renderer output callback function, called on the vsync thread static CVReturn VsyncCallback(CVDisplayLinkRef aDisplayLink, const CVTimeStamp* aNow, diff --git a/gfx/thebes/gfxPlatformMac.h b/gfx/thebes/gfxPlatformMac.h index 0807614f6f..ea4c1a1011 100644 --- a/gfx/thebes/gfxPlatformMac.h +++ b/gfx/thebes/gfxPlatformMac.h @@ -81,9 +81,6 @@ public: // lower threshold on font anti-aliasing uint32_t GetAntiAliasingThreshold() { return mFontAntiAliasingThreshold; } -protected: - bool AccelerateLayersByDefault() override; - private: virtual void GetPlatformCMSOutputProfile(void* &mem, size_t &size) override; diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index 1253fdb488..d02f156999 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -448,11 +448,11 @@ private: DECL_GFX_PREF(Once, "image.multithreaded_decoding.limit", ImageMTDecodingLimit, int32_t, -1); DECL_GFX_PREF(Live, "image.webp.enabled", ImageWebPEnabled, bool, true); - DECL_GFX_PREF(Once, "layers.acceleration.disabled", LayersAccelerationDisabledDoNotUseDirectly, bool, false); + DECL_GFX_PREF(Once, "layers.acceleration.enabled", LayersAccelerationEnabledDoNotUseDirectly, bool, true); DECL_GFX_PREF(Live, "layers.acceleration.draw-fps", LayersDrawFPS, bool, false); DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.print-histogram", FPSPrintHistogram, bool, false); DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.write-to-file", WriteFPSToFile, bool, false); - DECL_GFX_PREF(Once, "layers.acceleration.force-enabled", LayersAccelerationForceEnabledDoNotUseDirectly, bool, false); + DECL_GFX_PREF(Once, "layers.acceleration.force", LayersAccelerationForceEnabledDoNotUseDirectly, bool, false); DECL_GFX_PREF(Once, "layers.allow-d3d9-fallback", LayersAllowD3D9Fallback, bool, false); DECL_GFX_PREF(Once, "layers.amd-switchable-gfx.enabled", LayersAMDSwitchableGfxEnabled, bool, false); DECL_GFX_PREF(Once, "layers.async-pan-zoom.enabled", AsyncPanZoomEnabledDoNotUseDirectly, bool, true); diff --git a/gfx/thebes/gfxWindowsPlatform.h b/gfx/thebes/gfxWindowsPlatform.h index 129365f820..b56dab338a 100644 --- a/gfx/thebes/gfxWindowsPlatform.h +++ b/gfx/thebes/gfxWindowsPlatform.h @@ -226,9 +226,6 @@ public: bool SupportsPluginDirectDXGIDrawing(); protected: - bool AccelerateLayersByDefault() override { - return true; - } void GetAcceleratedCompositorBackends(nsTArray<mozilla::layers::LayersBackend>& aBackends) override; virtual void GetPlatformCMSOutputProfile(void* &mem, size_t &size) override; diff --git a/layout/base/crashtests/crashtests.list b/layout/base/crashtests/crashtests.list index e2cb99e04f..6ded4ff3f2 100644 --- a/layout/base/crashtests/crashtests.list +++ b/layout/base/crashtests/crashtests.list @@ -448,7 +448,7 @@ load 876092.html load 876221.html load 897852.html asserts(4-6) asserts-if(Android&&!asyncPan,2) load 898913.html # bug 847368 -pref(layers.acceleration.disabled,true) pref(layers.force-active,true) load 919434.html +pref(layers.acceleration.enabled,false) pref(layers.force-active,true) load 919434.html load 926728.html load 930381.html load 931450.html diff --git a/layout/tools/reftest/reftestcommandline.py b/layout/tools/reftest/reftestcommandline.py index da76fbd9a7..f983be528d 100644 --- a/layout/tools/reftest/reftestcommandline.py +++ b/layout/tools/reftest/reftestcommandline.py @@ -323,7 +323,8 @@ class DesktopArgumentsParser(ReftestArgumentsParser): def _prefs_gpu(self): if mozinfo.os != "win": - return ["layers.acceleration.force-enabled=true"] + return ["layers.acceleration.enabled=true", + "layers.acceleration.force=true"] return [] def validate(self, options, reftest): diff --git a/layout/tools/reftest/runreftest.py b/layout/tools/reftest/runreftest.py index 7845903bd3..7061b16ca5 100644 --- a/layout/tools/reftest/runreftest.py +++ b/layout/tools/reftest/runreftest.py @@ -287,11 +287,6 @@ class RefTest(object): prefs['browser.tabs.remote.autostart'] = True prefs['extensions.e10sBlocksEnabling'] = False - # Bug 1262954: For winXP + e10s disable acceleration - if platform.system() in ("Windows", "Microsoft") and \ - '5.1' in platform.version() and options.e10s: - prefs['layers.acceleration.disabled'] = True - # Bug 1300355: Disable canvas cache for win7 as it uses # too much memory and causes OOMs. if platform.system() in ("Windows", "Microsoft") and \ diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index dacfe6e49c..2a47a8ad9e 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -4497,7 +4497,16 @@ pref("network.tcp.keepalive.probe_count", 4); #endif // Whether to disable acceleration for all widgets. -pref("layers.acceleration.disabled", false); +#if defined(XP_UNIX) && !defined(XP_MACOSX) +// On Linux this is disabled by default for known issues with "free" drivers +pref("layers.acceleration.enabled", false); +#else +pref("layers.acceleration.enabled", true); +#endif +// Whether to force acceleration on, ignoring blacklists. +// This requires layers.acceleration.enabled to be set to true +pref("layers.acceleration.force", false); + // Preference that when switched at runtime will run a series of benchmarks // and output the result to stderr. pref("layers.bench.enabled", false); @@ -4506,18 +4515,6 @@ pref("layers.bench.enabled", false); pref("layers.gpu-process.dev.enabled", true); #endif -// Whether to force acceleration on, ignoring blacklists. -#ifdef ANDROID -// bug 838603 -- on Android, accidentally blacklisting OpenGL layers -// means a startup crash for everyone. -// Temporarily force-enable GL compositing. This is default-disabled -// deep within the bowels of the widgetry system. Remove me when GL -// compositing isn't default disabled in widget/android. -pref("layers.acceleration.force-enabled", true); -#else -pref("layers.acceleration.force-enabled", false); -#endif - pref("layers.acceleration.draw-fps", false); // Enable DEAA antialiasing for transformed layers in the compositor diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py index dd5439bd16..6763952af9 100644 --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -1678,11 +1678,6 @@ toolbar#nav-bar { prefs.update(self.extraPrefs(options.extraPrefs)) - # Bug 1262954: For windows XP + e10s disable acceleration - if platform.system() in ("Windows", "Microsoft") and \ - '5.1' in platform.version() and options.e10s: - prefs['layers.acceleration.disabled'] = True - # interpolate preferences interpolation = { "server": "%s:%s" % diff --git a/testing/mozharness/configs/unittests/linux_unittest.py b/testing/mozharness/configs/unittests/linux_unittest.py index 77e4ed5016..b591fa5597 100644 --- a/testing/mozharness/configs/unittests/linux_unittest.py +++ b/testing/mozharness/configs/unittests/linux_unittest.py @@ -222,7 +222,8 @@ config = { }, "reftest-no-accel": { "options": ["--suite=reftest", - "--setpref=layers.acceleration.force-enabled=disabled"], + "--setpref=layers.acceleration.enabled=disabled", + "--setpref=layers.acceleration.force=disabled"], "tests": ["tests/reftest/tests/layout/reftests/reftest.list"]}, }, "all_xpcshell_suites": { diff --git a/testing/mozharness/configs/unittests/win_taskcluster_unittest.py b/testing/mozharness/configs/unittests/win_taskcluster_unittest.py index 161e8e65eb..2eeae22e20 100644 --- a/testing/mozharness/configs/unittests/win_taskcluster_unittest.py +++ b/testing/mozharness/configs/unittests/win_taskcluster_unittest.py @@ -204,7 +204,7 @@ config = { "reftest-no-accel": { "options": ["--suite=reftest", "--setpref=gfx.direct2d.disabled=true", - "--setpref=layers.acceleration.disabled=true"], + "--setpref=layers.acceleration.enabled=false"], "tests": ["tests/reftest/tests/layout/reftests/reftest.list"] }, }, diff --git a/testing/mozharness/configs/unittests/win_unittest.py b/testing/mozharness/configs/unittests/win_unittest.py index caa2978c67..1f682cc8ff 100644 --- a/testing/mozharness/configs/unittests/win_unittest.py +++ b/testing/mozharness/configs/unittests/win_unittest.py @@ -204,7 +204,7 @@ config = { "reftest-no-accel": { "options": ["--suite=reftest", "--setpref=gfx.direct2d.disabled=true", - "--setpref=layers.acceleration.disabled=true"], + "--setpref=layers.acceleration.enabled=false"], "tests": ["tests/reftest/tests/layout/reftests/reftest.list"] }, }, diff --git a/testing/talos/talos/test.py b/testing/talos/talos/test.py index dc1306b8ed..6df5835bb7 100644 --- a/testing/talos/talos/test.py +++ b/testing/talos/talos/test.py @@ -556,8 +556,8 @@ class basic_compositor_video(PageloaderTest): sps_profile_interval = 1 sps_profile_entries = 2000000 preferences = {'full-screen-api.allow-trusted-requests-only': False, - 'layers.acceleration.force-enabled': False, - 'layers.acceleration.disabled': True, + 'layers.acceleration.force': False, + 'layers.acceleration.enabled': False, 'layout.frame_rate': 0, 'docshell.event_starvation_delay_hint': 1, 'full-screen-api.warning.timeout': 500, diff --git a/testing/talos/talos/ttest.py b/testing/talos/talos/ttest.py index 4a0fcd1351..3c57f020dd 100644 --- a/testing/talos/talos/ttest.py +++ b/testing/talos/talos/ttest.py @@ -64,7 +64,7 @@ class TTest(object): # Bug 1262954: winxp + e10s, disable hwaccel if self.platform_type == "win_" and browser_config['e10s']: prefs = browser_config['preferences'] - prefs['layers.acceleration.disabled'] = True + prefs['layers.acceleration.enabled'] = False with FFSetup(browser_config, test_config) as setup: return self._runTest(browser_config, test_config, setup) diff --git a/testing/testsuite-targets.mk b/testing/testsuite-targets.mk index ebe0d06cf0..f10bd079c2 100644 --- a/testing/testsuite-targets.mk +++ b/testing/testsuite-targets.mk @@ -60,11 +60,11 @@ RUN_REFTEST_B2G = rm -f ./$@.log && $(PYTHON) _tests/reftest/runreftestb2g.py \ ifeq ($(OS_ARCH),WINNT) #{ # GPU-rendered shadow layers are unsupported here -OOP_CONTENT = --setpref=layers.async-pan-zoom.enabled=true --setpref=browser.tabs.remote.autostart=true --setpref=layers.acceleration.disabled=true +OOP_CONTENT = --setpref=layers.async-pan-zoom.enabled=true --setpref=browser.tabs.remote.autostart=true --setpref=layers.acceleration.enabled=false GPU_RENDERING = else OOP_CONTENT = --setpref=layers.async-pan-zoom.enabled=true --setpref=browser.tabs.remote.autostart=true -GPU_RENDERING = --setpref=layers.acceleration.force-enabled=true +GPU_RENDERING = --setpref=layers.acceleration.enabled=true --setpref=layers.acceleration.force=true endif #} reftest: TEST_PATH?=layout/reftests/reftest.list diff --git a/testing/web-platform/harness/wptrunner/browsers/firefox.py b/testing/web-platform/harness/wptrunner/browsers/firefox.py index 183820c5cd..c03dd0eda8 100644 --- a/testing/web-platform/harness/wptrunner/browsers/firefox.py +++ b/testing/web-platform/harness/wptrunner/browsers/firefox.py @@ -142,11 +142,6 @@ class FirefoxBrowser(Browser): if self.e10s: self.profile.set_preferences({"browser.tabs.remote.autostart": True}) - # Bug 1262954: winxp + e10s, disable hwaccel - if (self.e10s and platform.system() in ("Windows", "Microsoft") and - '5.1' in platform.version()): - self.profile.set_preferences({"layers.acceleration.disabled": True}) - if self.ca_certificate_path is not None: self.setup_ssl() |