NPAPI:DrawImage: Difference between revisions

Jump to navigation Jump to search
 
Line 1: Line 1:
= Problem Summary =
= Problem Summary =


Very painful to render plugin content to non-X surfaces on linux with XServer. (for mozilla if MOZ_X11 defined then HandleEvent is operating with XEvent).
It is very painful to render plugin content to non-X surfaces on Linux using X11. (For Mozilla if MOZ_X11 is defined then HandleEvent is operating with XEvent's).
When browser rendering it's content into memory buffer or to some other surface (Qt::RasterPaintEngine/cairo-image-surface which are not very friendly with X), then we are forced to do data moving X-client-X...
When browser renders its content into a memory buffer or to some other surface (Qt::RasterPaintEngine/cairo-image-surface which are not very friendly to X), then we are forced to do data moving X-client-X...


= Proposal =
= Proposal =


I'm proposing a NPAPI Drawing model which would allow a plugin to render directly into image memory buffer, without involving XSurface.
I propose an NPAPI Drawing model which would allow a plugin to render directly into an image memory buffer, without involving XSurface.


= Event model negotiation =
= Event model negotiation =
Line 19: Line 19:
</pre>
</pre>


We should provide possibility to implement different event model for all platforms (not only Mac OS X).
We should provide the possibility to implement a different event model for all platforms (not only Mac OS X).


== NPEventModelNative ==
== NPEventModelNative ==
Line 49: Line 49:


Browser and plugin should negotiate Event model type:
Browser and plugin should negotiate Event model type:
* if no supported model type defined or NPEventModelNative only, then we use default event model system, specific to platform
* if no supported model type defined or NPEventModelNative only, then we use the default event model system, specific to platform
* If NPEventModelIndependent was negotiated as supported, then browser and plugin should negotiate also list of supported events
* If NPEventModelIndependent was negotiated as supported, then browser and plugin should also negotiate the list of supported events


=== NPEventType negotiation ===
=== NPEventType negotiation ===
Line 100: Line 100:
</pre>
</pre>


where NPImageFormat (similar to current cairo image format list):
where NPImageFormat (similar to the current Cairo image format list):
<pre>
<pre>
typedef enum {
typedef enum {
Line 124: Line 124:
</pre>
</pre>


Then plugin should decide which format's supported by plugin and browser (remove bits which are not supported by plugin), and set value to browser:
Then the plugin should decide which formats supported by plugin and browser (remove bits which are not supported by plugin), and send a value to browser:


<pre>
<pre>
Confirmed users
180

edits

Navigation menu