Bug 1064107 - Ensure that gfxPlatform is initialized by the time we create the compositor. r=Bas, a=sledru GECKO330_2014101104_RELBRANCH
authorNicolas Silva <nsilva@mozilla.com>
Thu, 09 Oct 2014 00:36:00 +0200
branchGECKO330_2014101104_RELBRANCH
changeset 218184 691739025fac
parent 218182 cb1f92f4298b
child 218185 7311ad1fba8c
push id573
push userryanvm@gmail.com
push date2014-11-06 04:14 +0000
treeherdermozilla-release@983a710b51c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas, sledru
bugs1064107
milestone33.0.3
Bug 1064107 - Ensure that gfxPlatform is initialized by the time we create the compositor. r=Bas, a=sledru
widget/xpwidgets/nsBaseWidget.cpp
--- a/widget/xpwidgets/nsBaseWidget.cpp
+++ b/widget/xpwidgets/nsBaseWidget.cpp
@@ -883,16 +883,19 @@ CheckForBasicBackends(nsTArray<LayersBac
       aHints[i] = LayersBackend::LAYERS_NONE;
     }
   }
 #endif
 }
 
 void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
 {
+  // This makes sure that gfxPlatforms gets initialized if it hasn't by now.
+  gfxPlatform::GetPlatform();
+
   MOZ_ASSERT(gfxPlatform::UsesOffMainThreadCompositing(),
              "This function assumes OMTC");
 
   // Recreating this is tricky, as we may still have an old and we need
   // to make sure it's properly destroyed by calling DestroyCompositor!
 
   // If we've already received a shutdown notification, don't try
   // create a new compositor.