NPAPI:AsyncDrawing: Difference between revisions

no edit summary
No edit summary
Line 29: Line 29:
= Async Drawing Mechanics =
= Async Drawing Mechanics =


For any async drawing model, plugins can request one or more surfaces from the host. The plugin can draw to these surfaces any more, asynchronously. The plugin will tell the host which surface is current at any given time and the host will display the current plugin surface for as long as it is current. While a surface is current the plugin is not allowed to modify it. This system allows the plugin to choose whether to double or triple buffer.
Any async drawing model will allow plugins to create one or more surfaces for drawing. The plugin will tell the host which surface is current at any given time and the host will display the current plugin surface for as long as it is current. While a surface is current the plugin is not allowed to modify it. This system allows the plugin to choose whether to double or triple buffer.


Surfaces are specified via the <code>NPAsyncSurface</code> structure. This structure contains a pointer to a platform-specific resource of the type defined by the drawing model:
Surfaces are specified via the <code>NPAsyncSurface</code> structure. This structure contains a pointer to a platform-specific resource of the type defined by the drawing model:
Confirmed users, Bureaucrats and Sysops emeriti
1,680

edits