bug 1175005: performance regression. backout_f081c464c1e2

This commit is contained in:
Joel Maher 2015-07-09 11:48:06 +01:00
parent 1cf6d6ed6a
commit 4b3190641d
2 changed files with 0 additions and 31 deletions

View File

@ -14,7 +14,6 @@
#include "prenv.h"
#include "GfxInfoX11.h"
#include "mozilla/X11Util.h"
#ifdef MOZ_CRASHREPORTER
#include "nsExceptionHandler.h"
@ -535,34 +534,6 @@ 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

View File

@ -48,8 +48,6 @@ public:
NS_IMETHOD_(void) GetData() override;
nsresult FindMonitors(JSContext* cx, JS::HandleObject array) override;
#ifdef DEBUG
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIGFXINFODEBUG