Bug 1530977 - Initialize D3D devices immediately when e10s is not active. r=mattwoodrow
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 27 Feb 2019 19:42:42 +0000
changeset 461567 f9e25c03e77aaccbb128ef0362e1538affb03fd7
parent 461566 4e5ac450f2b6dd57e9264fddc97971f6b5d8dc18
child 461568 b5b90efc07cbedc461a889d75dbf0d6bebb37356
push id79201
push userjyavenard@mozilla.com
push dateWed, 27 Feb 2019 23:12:53 +0000
treeherderautoland@f9e25c03e77a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1530977
milestone67.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 1530977 - Initialize D3D devices immediately when e10s is not active. r=mattwoodrow Differential Revision: https://phabricator.services.mozilla.com/D21352
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -419,16 +419,23 @@ bool gfxWindowsPlatform::HasBattery() {
 }
 
 void gfxWindowsPlatform::InitAcceleration() {
   gfxPlatform::InitAcceleration();
 
   DeviceManagerDx::Init();
 
   InitializeConfig();
+  // Ensure devices initialization. SharedSurfaceANGLE and
+  // SharedSurfaceD3D11Interop use them. The devices are lazily initialized
+  // with WebRender to reduce memory usage.
+  // Initialize them now when running non-e10s.
+  if (!BrowserTabsRemoteAutostart()) {
+    EnsureDevicesInitialized();
+  }
   UpdateANGLEConfig();
   UpdateRenderMode();
 
   // If we have Skia and we didn't init dwrite already, do it now.
   if (!DWriteEnabled() && GetDefaultContentBackend() == BackendType::SKIA) {
     InitDWriteSupport();
   }
   // We need to listen for font setting changes even if DWrite is not used.