Backout changeset 3b7d72e5e850 (bug 1196128, r=vladan)
authorDavid Anderson <danderson@mozilla.com>
Mon, 24 Aug 2015 23:20:30 -0400
changeset 259952 b45aad1fa02830e971c0eaf145a5b236a9c312cd
parent 259951 5899c44ed9ce7f54da590ce89d8922d34e4b7ac9
child 259953 db8aa4fdcba48cc0a9bf0e7a4ea6ebad9c6459f9
push id29296
push userryanvm@gmail.com
push dateSun, 30 Aug 2015 19:45:10 +0000
treeherdermozilla-central@2ad5077d86ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvladan
bugs1196128
milestone43.0a1
backs out3b7d72e5e8506540551e14edb8077145df795c97
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout changeset 3b7d72e5e850 (bug 1196128, r=vladan)
toolkit/components/gfx/SanityTest.js
toolkit/components/telemetry/TelemetryEnvironment.jsm
--- a/toolkit/components/gfx/SanityTest.js
+++ b/toolkit/components/gfx/SanityTest.js
@@ -69,26 +69,16 @@ function reportSnapshotResult(val) {
   histogram.add(val);
 }
 
 function reportTestReason(val) {
   let histogram = Services.telemetry.getHistogramById("GRAPHICS_SANITY_TEST_REASON");
   histogram.add(val);
 }
 
-function reportSnapshotContents(canvas) {
-  try {
-    var data = canvas.toDataURL();
-    Cc['@mozilla.org/observer-service;1'].
-        getService(Ci.nsIObserverService).
-        notifyObservers(null, "graphics-sanity-test-failed", data);
-  } catch (e) {
-  }
-}
-
 function annotateCrashReport(value) {
   try {
     // "1" if we're annotating the crash report, "" to remove the annotation.
     var crashReporter = Cc['@mozilla.org/toolkit/crash-reporter;1'].
                           getService(Ci.nsICrashReporter);
     crashReporter.annotateCrashReport("GraphicsSanityTest", value ? "1" : "");
   } catch (e) {
   }
@@ -172,19 +162,17 @@ let listener = {
   runSanityTest: function() {
     this.canvas = this.win.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
     this.canvas.setAttribute("width", PAGE_WIDTH);
     this.canvas.setAttribute("height", PAGE_HEIGHT);
     this.ctx = this.canvas.getContext("2d");
 
     // Perform the compositor backbuffer test, which currently we use for
     // actually deciding whether to enable hardware media decoding.
-    if (!testCompositor(this.win, this.ctx)) {
-      reportSnapshotContents(this.canvas);
-    }
+    testCompositor(this.win, this.ctx);
 
     this.endTest();
   },
 
   receiveMessage(message) {
     let data = message.data;
     switch (message.name) {
       case "gfxSanity:ContentLoaded":
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -164,17 +164,16 @@ const PREF_TELEMETRY_ENABLED = "toolkit.
 const PREF_UPDATE_ENABLED = "app.update.enabled";
 const PREF_UPDATE_AUTODOWNLOAD = "app.update.auto";
 const PREF_SEARCH_COHORT = "browser.search.cohort";
 
 const EXPERIMENTS_CHANGED_TOPIC = "experiments-changed";
 const SEARCH_ENGINE_MODIFIED_TOPIC = "browser-search-engine-modified";
 const SEARCH_SERVICE_TOPIC = "browser-search-service";
 const COMPOSITOR_CREATED_TOPIC = "compositor:created";
-const SANITY_TEST_FAILED_TOPIC = "graphics-sanity-test-failed";
 
 /**
  * Get the current browser.
  * @return a string with the locale or null on failure.
  */
 function getBrowserLocale() {
   try {
     return Cc["@mozilla.org/chrome/chrome-registry;1"].
@@ -822,25 +821,23 @@ EnvironmentCache.prototype = {
     }
   },
 
   _addObservers: function () {
     // Watch the search engine change and service topics.
     Services.obs.addObserver(this, SEARCH_ENGINE_MODIFIED_TOPIC, false);
     Services.obs.addObserver(this, SEARCH_SERVICE_TOPIC, false);
     Services.obs.addObserver(this, COMPOSITOR_CREATED_TOPIC, false);
-    Services.obs.addObserver(this, SANITY_TEST_FAILED_TOPIC, false);
   },
 
   _removeObservers: function () {
     // Remove the search engine change and service observers.
     Services.obs.removeObserver(this, SEARCH_ENGINE_MODIFIED_TOPIC);
     Services.obs.removeObserver(this, SEARCH_SERVICE_TOPIC);
     Services.obs.removeObserver(this, COMPOSITOR_CREATED_TOPIC);
-    Services.obs.removeObserver(this, SANITY_TEST_FAILED_TOPIC);
   },
 
   observe: function (aSubject, aTopic, aData) {
     this._log.trace("observe - aTopic: " + aTopic + ", aData: " + aData);
     switch (aTopic) {
       case SEARCH_ENGINE_MODIFIED_TOPIC:
         if (aData != "engine-default" && aData != "engine-current") {
           return;
@@ -856,19 +853,16 @@ EnvironmentCache.prototype = {
         this._updateSearchEngine();
         break;
       case COMPOSITOR_CREATED_TOPIC:
         // Full graphics information is not available until we have created at
         // least one off-main-thread-composited window. Thus we wait for the
         // first compositor to be created and then query nsIGfxInfo again.
         this._updateGraphicsFeatures();
         break;
-      case SANITY_TEST_FAILED_TOPIC:
-        this._onGraphicsSanityTestFailed(aData);
-        break;
     }
   },
 
   /**
    * Get the default search engine.
    * @return {String} Returns the search engine identifier, "NONE" if no default search
    *         engine is defined or "UNDEFINED" if no engine identifier or name can be found.
    */
@@ -938,21 +932,16 @@ EnvironmentCache.prototype = {
     try {
       let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
       gfxData.features = gfxInfo.getFeatures();
     } catch (e) {
       this._log.error("nsIGfxInfo.getFeatures() caught error", e);
     }
   },
 
-  _onGraphicsSanityTestFailed: function (aData) {
-    let gfxData = this._currentEnvironment.system.gfx;
-    gfxData.sanityTestSnapshot = aData;
-  },
-
   /**
    * Get the build data in object form.
    * @return Object containing the build data.
    */
   _getBuild: function () {
     let buildData = {
       applicationId: Services.appinfo.ID || null,
       applicationName: Services.appinfo.name || null,