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 358518 d9cd36fc09b2211bc30f17c66160f47a29bfe484
parent 358517 982c72148922b9cb4b970be2e9d96386dfedadf9
child 358519 a2d909c9cfbc5a311303eaada95fcc94b1a111ec
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersakotz, ritu
bugs1312530
milestone51.0a2
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) {