NPAPI:Pepper: Difference between revisions

Line 46: Line 46:
== Plugins and rendering ==
== Plugins and rendering ==


Currently plugins typically display 2D graphics in one of two modes: windowless or windowed.  In the current state of affairs windowless plugins are typically given an RGB surface containing the contents of lower layers and they composite themselves, leading to inconsistent alpha handling.  Furthermore, basically all access to 3D accelerated graphics are through the latter.  Windowed plugins provide a number of challenges to plugin and browser writers.  First, windowed plugins are essentially given a handle to an operating system native window, from which all interaction by the plugin is completely platform-specific.  Second, native windows make it very difficult for the browser to do CSS overlays, etc.  Third, although NPAPI provides the NPP_HandleEvent API, this is not well-defined with respect to native windowing system events.
Currently plugins typically display 2D graphics in one of two modes: windowless or windowed.  In the current state of affairs windowless plugins are typically given an RGB surface containing the contents of lower layers and they composite themselves.  This constrains the use of transparency and complicates plugins that are not the top or bottom layer.  Furthermore, basically all access to 3D accelerated graphics are through the latter.  Windowed plugins provide a number of challenges to plugin and browser writers.  First, windowed plugins are essentially given a handle to an operating system native window, from which all interaction by the plugin is completely platform-specific.  Second, native windows make it very difficult for the browser to do CSS overlays, etc.  Third, although NPAPI provides the NPP_HandleEvent API, this is not well-defined with respect to native windowing system events.


To these ends we propose, for both 2D and 3D:
To these ends we propose, for both 2D and 3D:
Line 70: Line 70:
We propose that we continue to set graphics attributes through the existing NPN_GetValue/NPN_SetValue interfaces with some new variables TBD.
We propose that we continue to set graphics attributes through the existing NPN_GetValue/NPN_SetValue interfaces with some new variables TBD.


There are about four APIs that would be involved in supporting this from the browser
There are four APIs that would be involved in supporting this from the browser.


=== NPP_SetWindow and Windowless Plugins ===
=== NPP_SetWindow and Windowless Plugins ===
89

edits