NPAPI:CoreAnimationDrawingModel: Difference between revisions

Jump to navigation Jump to search
Line 69: Line 69:
== CALayer lifecycle  ==
== CALayer lifecycle  ==


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, or adding them as sublayers of browser-owned CALayers). A plugin should release the layer for an instance during or after the instance's NPP_Destroy call.


== Software paints  ==
== Software paints  ==


Under certain circumstances the browser may require the plug-in to do a software paint. This is required whenever the browser needs to generate a snapshot of the page contents, for example when generating a drag-and-drop drag image, when generating history snapshots, and possibly for printing. To support these features, the browser will send a NPCocoaEventDrawRect, which tells the plug-in to do a software paint into the supplied CGContext. This is not expected to be a performance-critical code path.
Under certain circumstances the browser may require the plug-in to do a software paint. This is required whenever the browser needs to generate a snapshot of the page contents, for example when generating a drag-and-drop drag image, when generating history snapshots, and possibly for printing. To support these features, the browser will send a NPCocoaEventDrawRect, which tells the plug-in to do a software paint into the supplied CGContext. This is not expected to be a performance-critical code path.
12

edits

Navigation menu