Plugins:CoreAnimationDrawingModelR2

From MozillaWiki
Jump to navigation Jump to search

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.