Ensure gfxPlatform is created before creating a compositor on Android. (bug 1254899 part 3.1, r=snorp)
☠☠ backed out by df82a3088812 ☠ ☠
authorDavid Anderson <danderson@mozilla.com>
Wed, 27 Apr 2016 22:54:25 -0700
changeset 357314 64e58f9625ebb834fb232f01311bf4e17252ca6c
parent 357313 2de214d5d1e098230aa00d80813615104a27f067
child 357315 21c8a7ea2b93d6f61b0ad57fc9603c41b926a444
push id16755
push useryura.zenevich@gmail.com
push dateThu, 28 Apr 2016 15:12:20 +0000
reviewerssnorp
bugs1254899
milestone49.0a1
Ensure gfxPlatform is created before creating a compositor on Android. (bug 1254899 part 3.1, r=snorp)
widget/android/nsWindow.cpp
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1778,16 +1778,19 @@ nsWindow::CreateLayerManager(int aCompos
     }
 
     nsWindow *topLevelWindow = FindTopLevel();
     if (!topLevelWindow || topLevelWindow->mWindowType == eWindowType_invisible) {
         // don't create a layer manager for an invisible top-level window
         return;
     }
 
+    // Ensure that gfxPlatform is initialized first.
+    gfxPlatform::GetPlatform();
+
     if (ShouldUseOffMainThreadCompositing()) {
         CreateCompositor(aCompositorWidth, aCompositorHeight);
         if (mLayerManager) {
             return;
         }
 
         // If we get here, then off main thread compositing failed to initialize.
         sFailedToCreateGLContext = true;