NPAPI:AsyncDrawing: Difference between revisions

Jump to navigation Jump to search
Line 101: Line 101:
   void NPP_DidComposite(NPP instance);
   void NPP_DidComposite(NPP instance);
</pre>
</pre>
== Hidden Plugins ==
While a plugin is in a hidden tab (or is hidden for some other reason), the browser doesn't have to fire NPP_DidComposite. When the plugin becomes visible, the browser won't wait for the plugin to re-render before compositing --- that would defeat the purpose of an asynchronous API. This could mean displaying an old, stale frame of the plugin for a moment. A plugin can mitigate this by calling SetCurrentAsyncSurface at a low rate even while DidComposite is not being received. In some situations it might be appropriate for a plugin to set the current surface to NULL while it's hidden (NPP_SetWindow having set an empty clip-rect); this would cause the plugin to render nothing instead of a stale frame when it becomes visible.


= NPDrawingModelAsyncBitmapSurface =
= NPDrawingModelAsyncBitmapSurface =
1,295

edits

Navigation menu