Bug 651192 - Part 4: Allow setting different drawing models across all platforms. r=roc

This commit is contained in:
Bas Schouten
2012-02-16 04:24:38 +01:00
parent 1e62dc09bc
commit 15beecfc67
13 changed files with 79 additions and 28 deletions

View File

@@ -749,7 +749,12 @@ PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs
return NS_ERROR_FAILURE;
}
if (!CallNP_Initialize(error)) {
uint32_t flags = 0;
if (mozilla::Preferences::GetBool("plugin.allow.asyncdrawing", false)) {
flags |= kAllowAsyncDrawing;
}
if (!CallNP_Initialize(flags, error)) {
return NS_ERROR_FAILURE;
}
else if (*error != NPERR_NO_ERROR) {
@@ -773,7 +778,12 @@ PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error)
return NS_ERROR_FAILURE;
}
if (!CallNP_Initialize(error))
uint32_t flags = 0;
if (mozilla::Preferences::GetBool("plugin.allow.asyncdrawing", false)) {
flags |= kAllowAsyncDrawing;
}
if (!CallNP_Initialize(flags, error))
return NS_ERROR_FAILURE;
#if defined XP_WIN