Confirmed users
138
edits
Line 43: | Line 43: | ||
/* These formats describe the format in the memory byte-order. This means if | /* These formats describe the format in the memory byte-order. This means if | ||
* a 32-bit value of a pixel is viewed on a little-endian system the layout will | * a 32-bit value of a pixel is viewed on a little-endian system the layout will | ||
* be 0xAARRGGBB. | * be 0xAARRGGBB. The Alpha channel will be stored in the most significant | ||
* bits */ | * bits. */ | ||
typedef enum { | typedef enum { | ||
/* 32-bit per pixel 8-bit per channel - premultiplied alpha */ | /* 32-bit per pixel 8-bit per channel - premultiplied alpha */ | ||
Line 81: | Line 81: | ||
</pre> | </pre> | ||
What exactly this means depends on the drawing model's ownership policy and the implementation. If the finalized surface is current, | What exactly this means depends on the drawing model's ownership policy and the implementation. If the finalized surface is current, this function will return an error. | ||
The currently displayed surface can be set via a new function called <code>NPN_SetCurrentAsyncSurface</code>: | The currently displayed surface can be set via a new function called <code>NPN_SetCurrentAsyncSurface</code>: | ||
<pre> | <pre> | ||
void NPN_SetCurrentAsyncSurface(NPP instance, NPAsyncSurface* surface); | |||
</pre> | </pre> | ||
Surfaces cannot be modified while they are current. | Surfaces cannot be modified while they are current. | ||
The Init and Finalize functions must be called from the main plugin thread. The SetCurrent function may be called on another thread depending on the drawing model. | |||
= NPDrawingModelAsyncBitmapSurface = | = NPDrawingModelAsyncBitmapSurface = |