NPAPI:AsyncDrawing: Difference between revisions

no edit summary
No edit summary
Line 81: Line 81:
This model should be available on all platforms.
This model should be available on all platforms.


On succesful return the <code>data</code> pointer of the <code>NPAsyncSurface</code> will point to the data in memory for the surface. The <code>stride</code> member will reflect the stride of the returned image surface.
Plugins should create a bitmap surface by calling <code>NPN_InitAsyncSurface</code> with a <code>NULL</code> value for the <code>data</code> member of <code>NPAsyncSurface</code>. On successful return the <code>data</code> member will point to the bitmap memory. The <code>stride</code> member, set by the browser, will reflect the stride of the returned image surface. If an <code>NPImageFormat</code> is not supported then surface creation will fail.


If an <code>NPImageFormat</code> is not supported then surface creation will fail.
Plugins should destroy bitmap surfaces by calling <code>NPN_FinalizeAsyncSurface</code>. This will allow the browser to release the bitmap memory.


= NPDrawingModelAsyncWindowsSharedSurface =
= NPDrawingModelAsyncWindowsSharedSurface =
Confirmed users, Bureaucrats and Sysops emeriti
1,680

edits