Bug 943204. Don't use HWA compositors for transparent windows. r=mattwoodrow
authorNicholas Cameron <ncameron@mozilla.com>
Wed, 04 Dec 2013 11:56:12 +1300
changeset 158661 e52c27213bb7d7c266ab9b8adf3c6ff07a144bd6
parent 158660 27a9c236606b61daab8ead8ecfea7d523c3d3414
child 158662 24e2453b9e53adc0ea352cea65338b8d3ae7259a
push id25752
push usercbook@mozilla.com
push dateWed, 04 Dec 2013 08:35:03 +0000
treeherdermozilla-central@8187818246ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs943204
milestone28.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 943204. Don't use HWA compositors for transparent windows. r=mattwoodrow
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -6634,17 +6634,21 @@ nsWindow::StartAllowingD3D9(bool aReinit
 }
 
 void
 nsWindow::GetPreferredCompositorBackends(nsTArray<LayersBackend>& aHints)
 {
   LayerManagerPrefs prefs;
   GetLayerManagerPrefs(&prefs);
 
-  if (!prefs.mDisableAcceleration) {
+  // We don't currently support using an accelerated layer manager with
+  // transparent windows so don't even try. I'm also not sure if we even
+  // want to support this case. See bug 593471
+  if (!(prefs.mDisableAcceleration ||
+        mTransparencyMode == eTransparencyTransparent)) {
     if (prefs.mPreferOpenGL) {
       aHints.AppendElement(LAYERS_OPENGL);
     }
     if (!prefs.mPreferD3D9) {
       aHints.AppendElement(LAYERS_D3D11);
     }
     aHints.AppendElement(LAYERS_D3D9);
   }