Bug 971943: 4. gfx.layerscope.port and gfx.layerscope.enabled moved to gfxPrefs. r=dglastonbury

This commit is contained in:
Milan Sreckovic 2014-02-28 12:59:38 -05:00
parent d62526b056
commit d0b2a48907
2 changed files with 5 additions and 3 deletions

View File

@ -17,7 +17,7 @@
#include "gfxColor.h"
#include "gfxContext.h"
#include "gfxUtils.h"
#include "gfxPlatform.h"
#include "gfxPrefs.h"
#include "nsIWidget.h"
#include "GLContext.h"
@ -637,7 +637,7 @@ NS_IMPL_ISUPPORTS1(DebugDataSender, nsIRunnable);
void
LayerScope::CreateServerSocket()
{
if (!Preferences::GetBool("gfx.layerscope.enabled", false)) {
if (!gfxPrefs::LayerScopeEnabled()) {
return;
}
@ -814,7 +814,7 @@ LayerScopeWebSocketManager::LayerScopeWebSocketManager()
NS_NewThread(getter_AddRefs(mDebugSenderThread));
mServerSocket = do_CreateInstance(NS_SERVERSOCKET_CONTRACTID);
int port = Preferences::GetInt("gfx.layerscope.port", 23456);
int port = gfxPrefs::LayerScopePort();
mServerSocket->Init(port, false, -1);
mServerSocket->AsyncListen(new DebugListener);
}

View File

@ -112,6 +112,8 @@ private:
DECL_GFX_PREF(Once, "gfx.direct2d.disabled", Direct2DDisabled, bool, false);
DECL_GFX_PREF(Once, "gfx.direct2d.force-enabled", Direct2DForceEnabled, bool, false);
DECL_GFX_PREF(Live, "gfx.layerscope.enabled", LayerScopeEnabled, bool, false);
DECL_GFX_PREF(Live, "gfx.layerscope.port", LayerScopePort, int32_t, 23456);
DECL_GFX_PREF(Once, "gfx.work-around-driver-bugs", WorkAroundDriverBugs, bool, true);
DECL_GFX_PREF(Live, "gl.msaa-level", MSAALevel, uint32_t, 2);