NPAPI:InvalidatingCoreAnimation

From MozillaWiki
Revision as of 18:31, 7 May 2010 by Josh (talk | contribs) (Created page with '= Status = Under consideration. == Contributors == * Last modified: May 7, 2010 * Authors: Josh Aas (Mozilla Corporation) * Contributors: Benoit Girard (Mozilla Corporation), …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Status

Under consideration.

Contributors

  • Last modified: May 7, 2010
  • Authors: Josh Aas (Mozilla Corporation)
  • Contributors: Benoit Girard (Mozilla Corporation), Stuart Morgan (Google)

Overview

The regular Core Animation drawing model (NPDrawingModelCoreAnimation) does not work well for browser that don't hook CA layers into a layer tree. Browsers that want to read and composite data need a way to know when a plugin's pixels should be updated in order to operate efficiently. Core Animation does not allow for this.

Negotiating Invalidating Core Animation

For documentation on negotiating drawing models, see NPAPI:Models. The drawing model variables for Invalidating Core Animation are:

  • NPDrawingModelInvalidatingCoreAnimation (NPDrawingModel = 4)
  • NPNVsupportsInvalidatingCoreAnimationBool (NPNVariable = 2004)

Drawing

The Invalidating Core Animation model works much like the regular Core Animation model does. See the regular Core Animation documentation, which will not be duplicated here. The only difference is that when a plugin wants to draw it needs to call NPN_Invalidate and draw during the subsequent paint event.