b=591486 followup for non-d2d-surface win32 builds; a=bbbreakage

This commit is contained in:
Vladimir Vukicevic 2010-08-30 20:02:18 -04:00
parent e673a6783b
commit a4ed1e7e30

View File

@ -230,10 +230,14 @@ gfxWindowsPlatform::gfxWindowsPlatform()
::GetVersionExA(&versionInfo);
bool isVistaOrHigher = versionInfo.dwMajorVersion >= 6;
PRBool safeMode = PR_FALSE;
nsCOMPtr<nsIXULRuntime> xr = do_GetService("@mozilla.org/xre/runtime;1");
if (xr)
xr->GetInSafeMode(&safeMode);
#ifdef CAIRO_HAS_D2D_SURFACE
PRBool d2dDisabled = PR_FALSE;
PRBool d2dBlocked = PR_FALSE;
PRBool safeMode = PR_FALSE;
nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
if (gfxInfo) {
@ -258,10 +262,6 @@ gfxWindowsPlatform::gfxWindowsPlatform()
if (NS_FAILED(rv))
d2dDisabled = PR_FALSE;
nsCOMPtr<nsIXULRuntime> xr = do_GetService("@mozilla.org/xre/runtime;1");
if (xr)
xr->GetInSafeMode(&safeMode);
if (isVistaOrHigher && !d2dDisabled && !d2dBlocked && !safeMode) {
// We need a DWriteFactory to work.
HMODULE d3d10module = LoadLibraryA("d3d10_1.dll");