NPAPI:AsyncDrawing

From MozillaWiki
Revision as of 19:49, 16 September 2010 by Josh (talk | contribs)
Jump to navigation Jump to search

Status

Under consideration.

Contributors

  • Last modified: September 16, 2010
  • Authors: Bas Schouten (Mozilla Corporation), Josh Aas (Mozilla Corporation)
  • Contributors: Robert O'Callahan (Mozilla Corporation)

Overview

In order to support asynchronous drawing of plugins directly to a hardware drawing API, we are proposing to extend the NPAPI in order to allow asynchronous to surfaces potentially located in video memory. This drawing model will only be valid on Windows Vista and higher in order to simplify hardware accelerated surface sharing.

Negotiating Windows Async Drawing

For documentation on negotiating drawing models, see NPAPI:Models. The drawing model variables for Windows Async are:

  • NPDrawingModelWindowsAsync (NPDrawingModel = 555)
  • NPNVsupportsWindowsAsyncBool (NPNVariable = 556)

The Windows Asynchronous Drawing Model

The Windows Asynchronous drawing model essentially means a plugin will request one or more surfaces from the host that it can draw to. This drawing is allowed to be completely asynchronous. The plugin will tell the host which surface is current at any given time, and the host will display the plugin surface for as long as it is current. While a surface is current the plugin is not allowed to modify it.

Using Hardware Surfaces