Revive NPAPI async drawing: stub code. (bug 1217665 part 1, r=aklotz)
This commit is contained in:
@@ -1067,12 +1067,8 @@ nsNPAPIPluginInstance* nsNPAPIPluginInstance::GetFromNPP(NPP npp)
|
||||
|
||||
nsresult nsNPAPIPluginInstance::GetDrawingModel(int32_t* aModel)
|
||||
{
|
||||
#if defined(XP_MACOSX)
|
||||
*aModel = (int32_t)mDrawingModel;
|
||||
return NS_OK;
|
||||
#else
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
nsresult nsNPAPIPluginInstance::IsRemoteDrawingCoreAnimation(bool* aDrawing)
|
||||
@@ -1211,6 +1207,16 @@ nsNPAPIPluginInstance::GetImageSize(nsIntSize* aSize)
|
||||
return !library ? NS_ERROR_FAILURE : library->GetImageSize(&mNPP, aSize);
|
||||
}
|
||||
|
||||
void
|
||||
nsNPAPIPluginInstance::DidComposite()
|
||||
{
|
||||
if (RUNNING != mRunning)
|
||||
return;
|
||||
|
||||
AutoPluginLibraryCall library(this);
|
||||
library->DidComposite(&mNPP);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsNPAPIPluginInstance::NotifyPainted(void)
|
||||
{
|
||||
@@ -1625,6 +1631,35 @@ nsNPAPIPluginInstance::URLRedirectResponse(void* notifyData, NPBool allow)
|
||||
}
|
||||
}
|
||||
|
||||
NPError
|
||||
nsNPAPIPluginInstance::InitAsyncSurface(NPSize *size, NPImageFormat format,
|
||||
void *initData, NPAsyncSurface *surface)
|
||||
{
|
||||
if (mOwner) {
|
||||
return mOwner->InitAsyncSurface(size, format, initData, surface);
|
||||
}
|
||||
|
||||
return NPERR_GENERIC_ERROR;
|
||||
}
|
||||
|
||||
NPError
|
||||
nsNPAPIPluginInstance::FinalizeAsyncSurface(NPAsyncSurface *surface)
|
||||
{
|
||||
if (mOwner) {
|
||||
return mOwner->FinalizeAsyncSurface(surface);
|
||||
}
|
||||
|
||||
return NPERR_GENERIC_ERROR;
|
||||
}
|
||||
|
||||
void
|
||||
nsNPAPIPluginInstance::SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect *changed)
|
||||
{
|
||||
if (mOwner) {
|
||||
mOwner->SetCurrentAsyncSurface(surface, changed);
|
||||
}
|
||||
}
|
||||
|
||||
class CarbonEventModelFailureEvent : public nsRunnable {
|
||||
public:
|
||||
nsCOMPtr<nsIContent> mContent;
|
||||
|
||||
Reference in New Issue
Block a user