Plugins:CoreAnimationDrawingModelR2: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 10: Line 10:


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



Revision as of 16:07, 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 can schedule repaints via their CALayer's nextFrameTime or they may paint at any time using 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 'inf' from nextFrameTime.