Bug 1099074. Don't enable D2D1.1 with non-OMTC. r=bgirard,a=sylvestre
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Sat, 31 Jan 2015 11:18:48 -0500
changeset 243607 fff54c008d7d
parent 243606 85a7c4ca81f9
child 243608 db97d9b88b1a
push id4413
push userjmuizelaar@mozilla.com
push date2015-01-31 16:27 +0000
treeherdermozilla-beta@fff54c008d7d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgirard, sylvestre
bugs1099074
milestone36.0
Bug 1099074. Don't enable D2D1.1 with non-OMTC. r=bgirard,a=sylvestre We're seeing a number of crashes caused by mixing D2D1.1 and D3D10 non-OMTC among people who have explicitly disabled OMTC. This ensures we don't use D2D1.1 in that configuration.
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -482,17 +482,20 @@ gfxWindowsPlatform::UpdateRenderMode()
 
     uint32_t canvasMask = BackendTypeBit(BackendType::CAIRO);
     uint32_t contentMask = BackendTypeBit(BackendType::CAIRO);
     BackendType defaultBackend = BackendType::CAIRO;
     if (mRenderMode == RENDER_DIRECT2D) {
       canvasMask |= BackendTypeBit(BackendType::DIRECT2D);
       contentMask |= BackendTypeBit(BackendType::DIRECT2D);
 #ifdef USE_D2D1_1
-      if (gfxPrefs::Direct2DUse1_1() && Factory::SupportsD2D1()) {
+      if (gfxPrefs::Direct2DUse1_1() && Factory::SupportsD2D1() &&
+          // Bug 1099074 suggests that we don't handle D2D1.1 and non-OMTC D3D10
+          // very well so only enable D2D1.1 if we have OMTC
+          OffMainThreadCompositingEnabled()) {
         contentMask |= BackendTypeBit(BackendType::DIRECT2D1_1);
         canvasMask |= BackendTypeBit(BackendType::DIRECT2D1_1);
         defaultBackend = BackendType::DIRECT2D1_1;
       } else {
 #endif
         defaultBackend = BackendType::DIRECT2D;
 #ifdef USE_D2D1_1
       }