Confirmed users, Bureaucrats and Sysops emeriti
1,680
edits
(Created page with '= Status = Under consideration == Background == Currently, the only way for a plug-in on Mac to use OpenGL is to attach an AGL surface manually. This has a number of drawback…') |
(→Redraw) |
||
Line 71: | Line 71: | ||
The browser is not responsible for releasing retained CALayer objects it receives via the "NPPVpluginCoreAnimationLayer" variable. The browser may additionally retain layers (perhaps by attaching them to views). A plugin may release the layer for an instance during or after the instance's NPP_Destroy call. | The browser is not responsible for releasing retained CALayer objects it receives via the "NPPVpluginCoreAnimationLayer" variable. The browser may additionally retain layers (perhaps by attaching them to views). A plugin may release the layer for an instance during or after the instance's NPP_Destroy call. | ||
== | == Redrawing == | ||
Plugin-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]]. | |||
All plugin-ins should implement nextFrameTime for their CALayer. Plug-ins that never want to schedule drawing via nextFrameTime can return 'inf'. | |||
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. |