зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1519241 - remove nightly-only low-end device detection, r=kats,chutten,flod,mconley
Differential Revision: https://phabricator.services.mozilla.com/D24345 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
3de853018a
Коммит
8e02fa26bc
|
@ -948,10 +948,6 @@ void gfxPlatform::Init() {
|
|||
}
|
||||
};
|
||||
gfxPrefs::SetLayoutFrameRateChangeCallback(updateFrameRateCallback);
|
||||
gfxPrefs::SetIsLowEndMachineDoNotUseDirectlyChangeCallback(
|
||||
updateFrameRateCallback);
|
||||
gfxPrefs::SetAdjustToMachineChangeCallback(updateFrameRateCallback);
|
||||
gfxPrefs::SetResistFingerprintingChangeCallback(updateFrameRateCallback);
|
||||
// Set up the vsync source for the parent process.
|
||||
ReInitFrameRate();
|
||||
|
||||
|
@ -2914,12 +2910,6 @@ bool gfxPlatform::ContentUsesTiling() const {
|
|||
contentUsesPOMTP);
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool gfxPlatform::ShouldAdjustForLowEndMachine() {
|
||||
return gfxPrefs::AdjustToMachine() && !gfxPrefs::ResistFingerprinting() &&
|
||||
gfxPrefs::IsLowEndMachineDoNotUseDirectly();
|
||||
}
|
||||
|
||||
/***
|
||||
* The preference "layout.frame_rate" has 3 meanings depending on the value:
|
||||
*
|
||||
|
@ -2946,8 +2936,7 @@ bool gfxPlatform::IsInLayoutAsapMode() {
|
|||
|
||||
/* static */
|
||||
bool gfxPlatform::ForceSoftwareVsync() {
|
||||
return ShouldAdjustForLowEndMachine() || gfxPrefs::LayoutFrameRate() > 0 ||
|
||||
recordreplay::IsRecordingOrReplaying();
|
||||
return gfxPrefs::LayoutFrameRate() > 0 || recordreplay::IsRecordingOrReplaying();
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@ -2961,7 +2950,7 @@ int gfxPlatform::GetSoftwareVsyncRate() {
|
|||
|
||||
/* static */
|
||||
int gfxPlatform::GetDefaultFrameRate() {
|
||||
return ShouldAdjustForLowEndMachine() ? 30 : 60;
|
||||
return 60;
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
|
|
@ -607,15 +607,6 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener {
|
|||
|
||||
static bool UsesOffMainThreadCompositing();
|
||||
|
||||
/**
|
||||
* Whether we want to adjust gfx parameters (currently just
|
||||
* the framerate and whether we use software vs. hardware vsync)
|
||||
* down because we've determined we're on a low-end machine.
|
||||
* This will return false if the user has turned on fingerprinting
|
||||
* resistance (to ensure consistent behavior across devices).
|
||||
*/
|
||||
static bool ShouldAdjustForLowEndMachine();
|
||||
|
||||
/**
|
||||
* Get the hardware vsync source for each platform.
|
||||
* Should only exist and be valid on the parent process
|
||||
|
|
|
@ -761,11 +761,6 @@ class gfxPrefs final {
|
|||
|
||||
DECL_GFX_PREF(Live, "nglayout.debug.widget_update_flashing", WidgetUpdateFlashing, bool, false);
|
||||
|
||||
DECL_GFX_PREF(Live, "performance.adjust_to_machine", AdjustToMachine, bool, false);
|
||||
// Use gfxPlatform::ShouldAdjustForLowEndMachine() to determine if you should use low-end
|
||||
// machine code-paths, rather than checking this pref directly.
|
||||
DECL_GFX_PREF(Live, "performance.low_end_machine", IsLowEndMachineDoNotUseDirectly, bool, false);
|
||||
|
||||
DECL_GFX_PREF(Live, "print.font-variations-as-paths", PrintFontVariationsAsPaths, bool, true);
|
||||
|
||||
DECL_GFX_PREF(Live, "privacy.resistFingerprinting", ResistFingerprinting, bool, false);
|
||||
|
|
|
@ -975,14 +975,6 @@ pref("gfx.webrender.dl.dump-parent", false);
|
|||
pref("gfx.webrender.dl.dump-content", false);
|
||||
pref("gfx.webrender.picture-caching", true);
|
||||
|
||||
#ifdef NIGHTLY_BUILD
|
||||
pref("performance.adjust_to_machine", true);
|
||||
#else
|
||||
pref("performance.adjust_to_machine", false);
|
||||
#endif
|
||||
|
||||
pref("performance.low_end_machine", false);
|
||||
|
||||
pref("accessibility.browsewithcaret", false);
|
||||
pref("accessibility.warn_on_browsewithcaret", true);
|
||||
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
|
||||
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
ChromeUtils.defineModuleGetter(this, "AppConstants",
|
||||
"resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
const FRAME_SCRIPT_URL = "chrome://gfxsanity/content/gfxFrameScript.js";
|
||||
|
||||
const PAGE_WIDTH = 160;
|
||||
|
@ -27,8 +24,6 @@ const VERSION_PREF = "sanity-test.version";
|
|||
const ADVANCED_LAYERS_PREF = "sanity-test.advanced-layers";
|
||||
const DISABLE_VIDEO_PREF = "media.hardware-video-decoding.failed";
|
||||
const RUNNING_PREF = "sanity-test.running";
|
||||
const PERF_ADJUSTMENT_PREF = "performance.adjust_to_machine";
|
||||
const LOWEND_DEVICE_PREF = "performance.low_end_machine";
|
||||
const TIMEOUT_SEC = 20;
|
||||
|
||||
const AL_ENABLED_PREF = "layers.mlgpu.enabled";
|
||||
|
@ -335,24 +330,6 @@ SanityTest.prototype = {
|
|||
return true;
|
||||
},
|
||||
|
||||
_updateLowEndState() {
|
||||
// If we want to adjust performance based on the machine characteristics...
|
||||
if (Services.prefs.getBoolPref(PERF_ADJUSTMENT_PREF, AppConstants.EARLY_BETA_OR_EARLIER)) {
|
||||
// ... treat any machines with 1-2 cores and a clock speed under 1.8GHz
|
||||
// as "low-end". This will trigger use of a lower frame-rate to help free
|
||||
// the CPU for other work by reducing the amount of painting/compositing
|
||||
// we do.
|
||||
// The cut-off here is based on a combination of telemetry info, running
|
||||
// performance tests on the 2018 reference hardware, and gut instinct.
|
||||
// Ideally, we should replace it with one that's entirely powered by
|
||||
// data correlations from telemetry - see bug 1475242 for more.
|
||||
let isLowEnd = Services.sysinfo.get("cpucores") <= 2 && Services.sysinfo.get("cpuspeed") < 1800;
|
||||
Services.prefs.setBoolPref(LOWEND_DEVICE_PREF, isLowEnd);
|
||||
} else {
|
||||
Services.prefs.clearUserPref(LOWEND_DEVICE_PREF);
|
||||
}
|
||||
},
|
||||
|
||||
observe(subject, topic, data) {
|
||||
if (topic != "profile-after-change") return;
|
||||
|
||||
|
@ -365,8 +342,6 @@ SanityTest.prototype = {
|
|||
|
||||
annotateCrashReport();
|
||||
|
||||
this._updateLowEndState();
|
||||
|
||||
// Open a tiny window to render our test page, and notify us when it's loaded
|
||||
var sanityTest = Services.ww.openWindow(null,
|
||||
"chrome://gfxsanity/content/sanityparent.html",
|
||||
|
|
|
@ -1775,7 +1775,6 @@ EnvironmentCache.prototype = {
|
|||
D2DEnabled: getGfxField("D2DEnabled", null),
|
||||
DWriteEnabled: getGfxField("DWriteEnabled", null),
|
||||
ContentBackend: getGfxField("ContentBackend", null),
|
||||
LowEndMachine: getGfxField("LowEndMachine", false),
|
||||
// The following line is disabled due to main thread jank and will be enabled
|
||||
// again as part of bug 1154500.
|
||||
// DWriteVersion: getGfxField("DWriteVersion", null),
|
||||
|
|
|
@ -152,7 +152,6 @@ Structure:
|
|||
gfx: {
|
||||
D2DEnabled: <bool>, // null on failure
|
||||
DWriteEnabled: <bool>, // null on failure
|
||||
LowEndMachine: <bool>, // whether we're adjusting to being on low-spec hardware
|
||||
//DWriteVersion: <string>, // temporarily removed, pending bug 1154500
|
||||
adapters: [
|
||||
{
|
||||
|
|
|
@ -632,7 +632,6 @@ function checkSystemSection(data) {
|
|||
let gfxData = data.system.gfx;
|
||||
Assert.ok("D2DEnabled" in gfxData);
|
||||
Assert.ok("DWriteEnabled" in gfxData);
|
||||
Assert.equal(typeof gfxData.LowEndMachine, "boolean");
|
||||
// DWriteVersion is disabled due to main thread jank and will be enabled
|
||||
// again as part of bug 1154500.
|
||||
// Assert.ok("DWriteVersion" in gfxData);
|
||||
|
|
|
@ -466,7 +466,6 @@ var snapshotFormatters = {
|
|||
"contentUsesTiling",
|
||||
"offMainThreadPaintEnabled",
|
||||
"offMainThreadPaintWorkerCount",
|
||||
"lowEndMachine",
|
||||
"targetFrameRate",
|
||||
];
|
||||
for (let feature of featureKeys) {
|
||||
|
|
|
@ -239,7 +239,6 @@ uses-tiling = Uses Tiling
|
|||
content-uses-tiling = Uses Tiling (Content)
|
||||
off-main-thread-paint-enabled = Off Main Thread Painting Enabled
|
||||
off-main-thread-paint-worker-count = Off Main Thread Painting Worker Count
|
||||
low-end-machine = Detected less performant machine
|
||||
target-frame-rate = Target Frame Rate
|
||||
|
||||
audio-backend = Audio Backend
|
||||
|
|
|
@ -434,7 +434,6 @@ var dataProviders = {
|
|||
ContentUsesTiling: "contentUsesTiling",
|
||||
OffMainThreadPaintEnabled: "offMainThreadPaintEnabled",
|
||||
OffMainThreadPaintWorkerCount: "offMainThreadPaintWorkerCount",
|
||||
LowEndMachine: "lowEndMachine",
|
||||
TargetFrameRate: "targetFrameRate",
|
||||
};
|
||||
|
||||
|
|
|
@ -446,9 +446,6 @@ const SNAPSHOT_SCHEMA = {
|
|||
},
|
||||
},
|
||||
},
|
||||
lowEndMachine: {
|
||||
type: "boolean",
|
||||
},
|
||||
targetFrameRate: {
|
||||
type: "number",
|
||||
},
|
||||
|
|
|
@ -1462,12 +1462,6 @@ GfxInfoBase::GetOffMainThreadPaintWorkerCount(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GfxInfoBase::GetLowEndMachine(bool* aLowEndMachine) {
|
||||
*aLowEndMachine = gfxPlatform::ShouldAdjustForLowEndMachine();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GfxInfoBase::GetTargetFrameRate(uint32_t* aTargetFrameRate) {
|
||||
*aTargetFrameRate = gfxPlatform::TargetFrameRate();
|
||||
|
|
|
@ -73,7 +73,6 @@ class GfxInfoBase : public nsIGfxInfo,
|
|||
bool* aOffMainThreadPaintEnabled) override;
|
||||
NS_IMETHOD GetOffMainThreadPaintWorkerCount(
|
||||
int32_t* aOffMainThreadPaintWorkerCount) override;
|
||||
NS_IMETHOD GetLowEndMachine(bool* aLowEndMachine) override;
|
||||
NS_IMETHOD GetTargetFrameRate(uint32_t* aTargetFrameRate) override;
|
||||
|
||||
// Initialization function. If you override this, you must call this class's
|
||||
|
|
|
@ -29,7 +29,6 @@ interface nsIGfxInfo : nsISupports
|
|||
readonly attribute boolean ContentUsesTiling;
|
||||
readonly attribute boolean OffMainThreadPaintEnabled;
|
||||
readonly attribute long OffMainThreadPaintWorkerCount;
|
||||
readonly attribute boolean LowEndMachine;
|
||||
readonly attribute unsigned long TargetFrameRate;
|
||||
|
||||
// XXX: Switch to a list of devices, rather than explicitly numbering them.
|
||||
|
|
Загрузка…
Ссылка в новой задаче