Bug 717174 plugin is all black with wmode opaque on a xBGR display and no RENDER r=karlt
authorGinn Chen <ginn.chen@oracle.com>
Mon, 16 Jan 2012 09:31:33 +0800
changeset 85793 720f1f3c2c0f681fa42f0be907c2cefb4fc407dd
parent 85792 1007541442b5da8170f8a7d5627210e75673ba88
child 85794 a3bdb21f350c2f69fe0c67d9849417cc12081a7e
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs717174
milestone12.0a1
Bug 717174 plugin is all black with wmode opaque on a xBGR display and no RENDER r=karlt
dom/plugins/ipc/PluginInstanceChild.cpp
--- a/dom/plugins/ipc/PluginInstanceChild.cpp
+++ b/dom/plugins/ipc/PluginInstanceChild.cpp
@@ -2575,17 +2575,17 @@ PluginInstanceChild::MaybeCreatePlatform
             return true;
         }
 #endif
         // For image layer surface we should always create helper surface
         createHelperSurface = true;
         // Check if we can create helper surface with non-default visual
         visual = gfxXlibSurface::FindVisual(screen,
             static_cast<gfxImageSurface*>(mCurrentSurface.get())->Format());
-        if (visual && defaultVisual != visual && !supportNonDefaultVisual) {
+        if (!visual || (defaultVisual != visual && !supportNonDefaultVisual)) {
             visual = defaultVisual;
             mDoAlphaExtraction = mIsTransparent;
         }
     }
 
     if (createHelperSurface) {
         if (!visual) {
             NS_ERROR("Need X falback surface, but visual failed");