bug 1175005: performance regression. backout_f081c464c1e2
authorJoel Maher <jmaher@mozilla.com>
Thu, 09 Jul 2015 11:48:06 +0100
changeset 502550 6bbf4fd21d265561b73ffdf7f7dfa6729fa6226a
parent 502549 38abe2cb9f0a41b45c9a54ec33eff9aa18e20fb8
child 502551 f9d8bb07310c3df2cd982cf05b5647c0d72d5c15
push id77571
push userjruderman@mozilla.com
push dateThu, 09 Jul 2015 14:25:34 +0000
treeherdertry@8eb2bf70a81c [default view] [failures only]
bugs1175005
milestone42.0a1
bug 1175005: performance regression. backout_f081c464c1e2
widget/GfxInfoX11.cpp
widget/GfxInfoX11.h
--- a/widget/GfxInfoX11.cpp
+++ b/widget/GfxInfoX11.cpp
@@ -9,17 +9,16 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <errno.h>
 #include <sys/utsname.h>
 #include "nsCRTGlue.h"
 #include "prenv.h"
 
 #include "GfxInfoX11.h"
-#include "mozilla/X11Util.h"
 
 #ifdef MOZ_CRASHREPORTER
 #include "nsExceptionHandler.h"
 #include "nsICrashReporter.h"
 #endif
 
 namespace mozilla {
 namespace widget {
@@ -530,44 +529,16 @@ GfxInfo::GetAdapterSubsysID2(nsAString &
 
 /* readonly attribute boolean isGPU2Active; */
 NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
 {
   return NS_ERROR_FAILURE;
 }
 
-nsresult
-GfxInfo::FindMonitors(JSContext* aCx, JS::HandleObject aOutArray)
-{
-#if defined(MOZ_WIDGET_GTK)
-  // No display in xpcshell mode.
-  if (!gdk_display_get_default()) {
-    return NS_OK;
-  }
-#endif
-
-  // Note: this doesn't support Xinerama. Two physical displays will be
-  // reported as one monitor covering the entire virtual screen.
-  Display* display = DefaultXDisplay();
-  Screen* screen = DefaultScreenOfDisplay(display);
-
-  JS::Rooted<JSObject*> obj(aCx, JS_NewPlainObject(aCx));
-
-  JS::Rooted<JS::Value> screenWidth(aCx, JS::Int32Value(WidthOfScreen(screen)));
-  JS_SetProperty(aCx, obj, "screenWidth", screenWidth);
-
-  JS::Rooted<JS::Value> screenHeight(aCx, JS::Int32Value(HeightOfScreen(screen)));
-  JS_SetProperty(aCx, obj, "screenHeight", screenHeight);
-
-  JS::Rooted<JS::Value> element(aCx, JS::ObjectValue(*obj));
-  JS_SetElement(aCx, aOutArray, 0, element);
-  return NS_OK;
-}
-
 #ifdef DEBUG
 
 // Implement nsIGfxInfoDebug
 // We don't support spoofing anything on Linux
 
 /* void spoofVendorID (in DOMString aVendorID); */
 NS_IMETHODIMP GfxInfo::SpoofVendorID(const nsAString & aVendorID)
 {
--- a/widget/GfxInfoX11.h
+++ b/widget/GfxInfoX11.h
@@ -43,18 +43,16 @@ public:
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
   using GfxInfoBase::GetWebGLParameter;
 
   virtual nsresult Init() override;
   
   NS_IMETHOD_(void) GetData() override;
 
-  nsresult FindMonitors(JSContext* cx, JS::HandleObject array) override;
-
 #ifdef DEBUG
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIGFXINFODEBUG
 #endif
 
 protected:
   ~GfxInfo() {}