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 295164 64e58f9625ebb834fb232f01311bf4e17252ca6c
parent 295163 2de214d5d1e098230aa00d80813615104a27f067
child 295165 21c8a7ea2b93d6f61b0ad57fc9603c41b926a444
push id75834
push userdanderson@mozilla.com
push dateThu, 28 Apr 2016 05:58:25 +0000
treeherdermozilla-inbound@f749ee384012 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1254899
milestone49.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
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;