Bug 1331170 - Part 2: Remove gfx/thebes checks for Windows 7+. r?dvander draft
authorChris Peterson <cpeterson@mozilla.com>
Mon, 09 Jan 2017 21:21:40 -0800
changeset 461038 1655557ae9181ba6bb6b910f7e77ee32a7ecc1dd
parent 461037 9ab45cd87dd2b876d5bb67b997c40a9a38faa73c
child 542191 f7b25c3e1ea04e872504c7ceedc992dd332c41cb
push id41548
push usercpeterson@mozilla.com
push dateSat, 14 Jan 2017 21:15:57 +0000
reviewersdvander
bugs1331170
milestone53.0a1
Bug 1331170 - Part 2: Remove gfx/thebes checks for Windows 7+. r?dvander MozReview-Commit-ID: 3odBsRFRmD0
gfx/thebes/gfxGDIFontList.cpp
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxGDIFontList.cpp
+++ b/gfx/thebes/gfxGDIFontList.cpp
@@ -874,25 +874,18 @@ gfxGDIFontList::MakePlatformFont(const n
     // make a new font entry using the unique name
     WinUserFontData *winUserFontData = new WinUserFontData(fontRef);
     uint16_t w = (aWeight == 0 ? 400 : aWeight);
 
     GDIFontEntry *fe = GDIFontEntry::CreateFontEntry(uniqueName,
         gfxWindowsFontType(isCFF ? GFX_FONT_TYPE_PS_OPENTYPE : GFX_FONT_TYPE_TRUETYPE) /*type*/,
         aStyle, w, aStretch, winUserFontData, false);
 
-    if (!fe)
-        return fe;
-
-    fe->mIsDataUserFont = true;
-
-    // Uniscribe doesn't place CFF fonts loaded privately
-    // via AddFontMemResourceEx on XP/Vista
-    if (isCFF && !IsWin7OrLater()) {
-        fe->mForceGDI = true;
+    if (fe) {
+      fe->mIsDataUserFont = true;
     }
 
     return fe;
 }
 
 bool
 gfxGDIFontList::FindAndAddFamilies(const nsAString& aFamily,
                                    nsTArray<gfxFontFamily*>* aOutput,
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -188,20 +188,16 @@ public:
         int64_t dedicatedBytesUsed = 0;
         int64_t sharedBytesUsed = 0;
         int64_t committedBytesUsed = 0;
         IDXGIAdapter *DXGIAdapter;
 
         HMODULE gdi32Handle;
         PFND3DKMTQS queryD3DKMTStatistics = nullptr;
 
-        // GPU memory reporting is not available before Windows 7
-        if (!IsWin7OrLater())
-            return NS_OK;
-
         if ((gdi32Handle = LoadLibrary(TEXT("gdi32.dll"))))
             queryD3DKMTStatistics = (PFND3DKMTQS)GetProcAddress(gdi32Handle, "D3DKMTQueryStatistics");
 
         if (queryD3DKMTStatistics && GetDXGIAdapter(&DXGIAdapter)) {
             // Most of this block is understood thanks to wj32's work on Process Hacker
 
             DXGI_ADAPTER_DESC adapterDesc;
             D3DKMTQS queryStatistics;
@@ -1618,24 +1614,22 @@ gfxWindowsPlatform::InitGPUProcessSuppor
 
   if (!gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
     // Don't use the GPU process if not using D3D11.
     gpuProc.Disable(
       FeatureStatus::Unavailable,
       "Not using GPU Process since D3D11 is unavailable",
       NS_LITERAL_CSTRING("FEATURE_FAILURE_NO_D3D11"));
   } else if (!IsWin7SP1OrLater()) {
-    // For Windows XP, we simply don't care enough to support this
-    // configuration. On Windows Vista and 7 Pre-SP1, DXGI 1.2 is not
-    // available and remote presentation for D3D11 will not work. Rather
-    // than take a regression and use D3D9, we revert back to in-process
-    // rendering.
+    // On Windows 7 Pre-SP1, DXGI 1.2 is not available and remote presentation
+    // for D3D11 will not work. Rather than take a regression and use D3D9, we
+    // revert back to in-process rendering.
     gpuProc.Disable(
       FeatureStatus::Unavailable,
-      "Windows XP, Vista, and 7 Pre-SP1 cannot use the GPU process",
+      "Windows 7 Pre-SP1 cannot use the GPU process",
       NS_LITERAL_CSTRING("FEATURE_FAILURE_OLD_WINDOWS"));
   } else if (!IsWin8OrLater()) {
     // Windows 7 SP1 can have DXGI 1.2 only via the Platform Update, so we
     // explicitly check for that here.
     if (!DeviceManagerDx::Get()->CheckRemotePresentSupport()) {
       gpuProc.Disable(
         FeatureStatus::Unavailable,
         "GPU Process requires the Windows 7 Platform Update",