Plugins:CoreAnimationDrawingModelR2: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
 
Line 15: Line 15:
== Redrawing ==
== Redrawing ==


Plug-ins can schedule repaints via their CALayer's nextFrameTime or they may paint at any time using [https://developer-stage.mozilla.org/en/NPN_InvalidateRect NPN_InvalidateRect].
Plug-ins may inform the browser of updated content at any time using [https://developer-stage.mozilla.org/en/NPN_InvalidateRect NPN_InvalidateRect].
 
All plug-ins should implement nextFrameTime for their CALayer. Plug-ins that want their next repaint to happen via NPN_InvalidateRect can return 'INFINITY' from nextFrameTime.
 
Browsers should re-check nextFrameTime any time a paint happens, whether it was scheduled via nextFrameTime or forced via NPN_InvalidateRect. This allows plugins to change their next frame time and to re-start scheduled painting after returning 'INFINITY' from nextFrameTime.

Latest revision as of 17:34, 9 March 2010

Status

Under consideration

Background

This defines an extension to the Core Animation drawing model which adds support for event-driven drawing. We propose adding the following "Redrawing" section. This should be backwards compatible with the existing spec.

Current Proposal

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

Redrawing

Plug-ins may inform the browser of updated content at any time using NPN_InvalidateRect.