From 9249b507204e0d649585b8007fc57044ae8227ee Mon Sep 17 00:00:00 2001 From: Joel Maher Date: Thu, 9 Jul 2015 11:47:51 +0100 Subject: [PATCH] bug 1175005: performance regression. backout_d9c8c1d14037 --- .../components/telemetry/TelemetryEnvironment.jsm | 10 ---------- toolkit/components/telemetry/docs/environment.rst | 12 ------------ .../tests/unit/test_TelemetryEnvironment.js | 14 -------------- 3 files changed, 36 deletions(-) diff --git a/toolkit/components/telemetry/TelemetryEnvironment.jsm b/toolkit/components/telemetry/TelemetryEnvironment.jsm index a2fd745ce269..6825d327fad2 100644 --- a/toolkit/components/telemetry/TelemetryEnvironment.jsm +++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm @@ -1127,18 +1127,8 @@ EnvironmentCache.prototype = { // again as part of bug 1154500. //DWriteVersion: getGfxField("DWriteVersion", null), adapters: [], - monitors: [], }; -#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID) - let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo); - try { - gfxData.monitors = gfxInfo.getMonitors(); - } catch (e) { - this._log.error("nsIGfxInfo.getMonitors() caught error", e); - } -#endif - // GfxInfo does not yet expose a way to iterate through all the adapters. gfxData.adapters.push(getGfxAdapter("")); gfxData.adapters[0].GPUActive = true; diff --git a/toolkit/components/telemetry/docs/environment.rst b/toolkit/components/telemetry/docs/environment.rst index e4c891fb70c5..8ce36cae5775 100644 --- a/toolkit/components/telemetry/docs/environment.rst +++ b/toolkit/components/telemetry/docs/environment.rst @@ -133,18 +133,6 @@ Structure:: }, ... ], - // Note: currently only added on Desktop. On Linux, only a single - // monitor is returned representing the entire virtual screen. - monitors: [ - { - screenWidth: , // screen width in pixels - screenHeight: , // screen height in pixels - refreshRate: , // refresh rate in hertz (present on Windows only) - pseudoDisplay: , // networked screen (present on Windows only) - scale: , // backing scale factor (present on Mac only) - }, - ... - ], }, }, addons: { diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js index 5e0de56e903c..7c024591fdc2 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js @@ -416,20 +416,6 @@ function checkSystemSection(data) { Assert.equal(typeof gfxData.adapters[0].GPUActive, "boolean"); Assert.ok(gfxData.adapters[0].GPUActive, "The first GFX adapter must be active."); - Assert.ok(Array.isArray(gfxData.monitors)); - if (gIsWindows || gIsMac) { - Assert.ok(gfxData.monitors.length >= 1, "There is at least one monitor."); - Assert.equal(typeof gfxData.monitors[0].screenWidth, "number"); - Assert.equal(typeof gfxData.monitors[0].screenHeight, "number"); - if (gIsWindows) { - Assert.equal(typeof gfxData.monitors[0].refreshRate, "number"); - Assert.equal(typeof gfxData.monitors[0].pseudoDisplay, "boolean"); - } - if (gIsMac) { - Assert.equal(typeof gfxData.monitors[0].scale, "number"); - } - } - try { // If we've not got nsIGfxInfoDebug, then this will throw and stop us doing // this test.