Bug 1066139 - Put stereo video behind a pref (off by default). r=Bas

This commit is contained in:
Nicolas Silva 2014-09-23 17:57:14 -04:00
parent f705025184
commit d3e6013f97
2 changed files with 15 additions and 11 deletions

View File

@ -17,6 +17,7 @@
#include "gfxWindowsPlatform.h"
#include "TextureD3D9.h"
#include "mozilla/gfx/Point.h"
#include "gfxPrefs.h"
namespace mozilla {
namespace layers {
@ -201,18 +202,20 @@ DeviceManagerD3D9::Init()
return false;
}
/* Create an Nv3DVUtils instance */
if (!mNv3DVUtils) {
mNv3DVUtils = new Nv3DVUtils();
if (!mNv3DVUtils) {
NS_WARNING("Could not create a new instance of Nv3DVUtils.\n");
}
}
if (gfxPrefs::StereoVideoEnabled()) {
/* Create an Nv3DVUtils instance */
if (!mNv3DVUtils) {
mNv3DVUtils = new Nv3DVUtils();
if (!mNv3DVUtils) {
NS_WARNING("Could not create a new instance of Nv3DVUtils.\n");
}
}
/* Initialize the Nv3DVUtils object */
if (mNv3DVUtils) {
mNv3DVUtils->Initialize();
}
/* Initialize the Nv3DVUtils object */
if (mNv3DVUtils) {
mNv3DVUtils->Initialize();
}
}
HMODULE d3d9 = LoadLibraryW(L"d3d9.dll");
decltype(Direct3DCreate9)* d3d9Create = (decltype(Direct3DCreate9)*)

View File

@ -286,6 +286,7 @@ private:
DECL_GFX_PREF(Once, "webgl.force-layers-readback", WebGLForceLayersReadback, bool, false);
DECL_GFX_PREF(Once, "layers.stereo-video.enabled", StereoVideoEnabled, bool, false);
public:
// Manage the singleton:
static gfxPrefs& GetSingleton()