Bug 1312530 - Force windowless plugin mode in 64-bit builds if async rendering is disabled. r=akotz, a=ritu
authorJim Mathies <jmathies@mozilla.com>
Tue, 25 Oct 2016 08:10:54 -0500
changeset 350803 36b88fa83de99938d23058ba6d0749bfeecf8d41
parent 350802 6865d79cc63ba61f4393efc59916cf2a6b5a8056
child 350804 c48392808bf05ecbe64356b9d95832203373cc45
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersakotz, ritu
bugs1312530
milestone50.0
Bug 1312530 - Force windowless plugin mode in 64-bit builds if async rendering is disabled. r=akotz, a=ritu MozReview-Commit-ID: LEUdMKm1BNe
dom/plugins/ipc/PluginModuleParent.cpp
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -2710,18 +2710,23 @@ PluginModuleParent::NPP_NewInternal(NPMI
 
     nsDependentCString strPluginType(pluginType);
     PluginInstanceParent* parentInstance =
         new PluginInstanceParent(this, instance, strPluginType, mNPNIface);
 
     if (mIsFlashPlugin) {
         parentInstance->InitMetadata(strPluginType, srcAttribute);
 #ifdef XP_WIN
-        bool supportsAsyncRender = false;
-        CallModuleSupportsAsyncRender(&supportsAsyncRender);
+        bool supportsAsyncRender =
+          Preferences::GetBool("dom.ipc.plugins.asyncdrawing.enabled", false);
+        if (supportsAsyncRender) {
+          // Prefs indicates we want async plugin rendering, make sure
+          // the flash module has support.
+          CallModuleSupportsAsyncRender(&supportsAsyncRender);
+        }
 #ifdef _WIN64
         // For 64-bit builds force windowless if the flash library doesn't support
         // async rendering regardless of sandbox level.
         if (!supportsAsyncRender) {
 #else
         // For 32-bit builds force windowless if the flash library doesn't support
         // async rendering and the sandbox level is 2 or greater.
         if (!supportsAsyncRender && mSandboxLevel >= 2) {