NPAPI:Pepper: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 58: Line 58:


This proposal is clearer at this moment regarding 2D graphics. We expect we may need to pass some state (2d vs. 3d, hardware vs. raster, etc.) in through other calls and/or with some extensions to the data structures we propose below.
This proposal is clearer at this moment regarding 2D graphics. We expect we may need to pass some state (2d vs. 3d, hardware vs. raster, etc.) in through other calls and/or with some extensions to the data structures we propose below.
A plugin may call NPN_GetValue() with the following NPNVariable to query the browser whether it supports the Pepper drawing model:
<pre>
/* TRUE if the browser supports the PepperGraphics drawing model */
NPNVsupportsPepperGraphicsBool = xxxx
</pre>
Once the plugin finds a supported drawing model, it calls NPN_SetValue() to tell the browser which drawing model it will use. We're using the NPNVariable used for Mac drawing model for this:
<pre>
NPNVpluginDrawingModel = 1000 /* The NPDrawingModel specified by the plugin */
</pre>
We will extend the NPDrawingModel enumeration proposed for Mac with another model:
<pre>
typedef enum {
    ...
    NPDrawingModelPepperGraphics = 2,
} NPDrawingModel;
</pre>


=== An Example ===
=== An Example ===
89

edits

Navigation menu