Bug 1103176: Block Direct2D when D3D11 layers is blacklisted. r=BenWa
authorBas Schouten <bschouten@mozilla.com>
Mon, 24 Nov 2014 19:44:52 +0000
changeset 217259 2b63fa9da2010fc86e3d0024bff779091a7e9633
parent 217258 017788319d00d50e94e88dcaaafb3263d3412252
child 217260 b66c71e822ca0da883458b9ae1491414d6c869b7
push id27877
push usercbook@mozilla.com
push dateTue, 25 Nov 2014 11:48:25 +0000
treeherdermozilla-central@4631a7474d8a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBenWa
bugs1103176
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1103176: Block Direct2D when D3D11 layers is blacklisted. r=BenWa When the D3D11 compositor is blocked through blacklisting, we have no way of using Direct2D in a fast manner and do not want it to be used in any situation.
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -404,16 +404,21 @@ gfxWindowsPlatform::UpdateRenderMode()
     nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
     if (gfxInfo) {
         int32_t status;
         if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT2D, &status))) {
             if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
                 d2dBlocked = true;
             }
         }
+        if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, &status))) {
+            if (status != nsIGfxInfo::FEATURE_STATUS_OK) {
+                d2dBlocked = true;
+            }
+        }
     }
 
     // These will only be evaluated once, and any subsequent changes to
     // the preferences will be ignored until restart.
     d2dDisabled = gfxPrefs::Direct2DDisabled();
     d2dForceEnabled = gfxPrefs::Direct2DForceEnabled();
 
     bool tryD2D = d2dForceEnabled || (!d2dBlocked && !gfxPrefs::LayersPreferD3D9());