Bug 663259 - Part 2: Restore Synchronous plugin rendering, with preference for async rendering. r=smichaud

This commit is contained in:
Benoit Girard
2011-06-30 12:46:26 -04:00
parent b7e514805d
commit 9179915df6
13 changed files with 107 additions and 12 deletions

View File

@@ -88,7 +88,7 @@ nsNPAPIPluginInstance::nsNPAPIPluginInstance(nsNPAPIPlugin* plugin)
mMIMEType(nsnull),
mOwner(nsnull),
mCurrentPluginEvent(nsnull),
#if defined(MOZ_X11) || defined(XP_WIN) || defined(XP_MACOSX)
#if defined(MOZ_X11) || defined(XP_WIN)
mUsePluginLayersPref(PR_TRUE)
#else
mUsePluginLayersPref(PR_FALSE)
@@ -722,6 +722,22 @@ nsresult nsNPAPIPluginInstance::GetDrawingModel(PRInt32* aModel)
#endif
}
nsresult nsNPAPIPluginInstance::IsRemoteDrawingCoreAnimation(PRBool* aDrawing)
{
#ifdef XP_MACOSX
if (!mPlugin)
return NS_ERROR_FAILURE;
PluginLibrary* library = mPlugin->GetLibrary();
if (!library)
return NS_ERROR_FAILURE;
return library->IsRemoteDrawingCoreAnimation(&mNPP, aDrawing);
#else
return NS_ERROR_FAILURE;
#endif
}
nsresult
nsNPAPIPluginInstance::GetJSObject(JSContext *cx, JSObject** outObject)
{