Bug 1565980. Force wmode 'gpu' to 'direct'. r=jmathies, a=RyanVM
authorJeff Muizelaar <jrmuizel@gmail.com>
Fri, 26 Jul 2019 13:48:01 +0000
changeset 544800 70b4a4703c5f4494c03250b938b619571418f144
parent 544799 e3cc2a54770d39526562d09a5cb3ddd34fc878b6
child 544801 2d4a2ec991541f772e9a26863ee5132221e95d81
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmathies, RyanVM
bugs1565980
milestone69.0
Bug 1565980. Force wmode 'gpu' to 'direct'. r=jmathies, a=RyanVM This fixes wmode='gpu' with WebRender. Differential Revision: https://phabricator.services.mozilla.com/D39420
dom/plugins/ipc/PluginModuleParent.cpp
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -2042,17 +2042,18 @@ static void ForceWindowless(InfallibleTA
 #if defined(XP_WIN)
 static void ForceDirect(InfallibleTArray<nsCString>& names,
                         InfallibleTArray<nsCString>& values) {
   nsCaseInsensitiveUTF8StringArrayComparator comparator;
   NS_NAMED_LITERAL_CSTRING(wmodeAttributeName, "wmode");
   NS_NAMED_LITERAL_CSTRING(directAttributeValue, "direct");
   auto wmodeAttributeIndex = names.IndexOf(wmodeAttributeName, 0, comparator);
   if (wmodeAttributeIndex != names.NoIndex) {
-    if (values[wmodeAttributeIndex].EqualsLiteral("window")) {
+    if (values[wmodeAttributeIndex].EqualsLiteral("window") ||
+        values[wmodeAttributeIndex].EqualsLiteral("gpu")) {
       values[wmodeAttributeIndex].Assign(directAttributeValue);
     }
   } else {
     names.AppendElement(wmodeAttributeName);
     values.AppendElement(directAttributeValue);
   }
 }
 #endif  // windows