Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
NPImageExpose
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  14 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Doug Turner  
View profile  
 More options Oct 13 2009, 8:20 pm
Newsgroups: mozilla.dev.tech.plugins
Followup-To: mozilla.dev.tech.plugins
From: Doug Turner <doug.tur...@gmail.com>
Date: Tue, 13 Oct 2009 17:20:49 -0700 (PDT)
Local: Tues, Oct 13 2009 8:20 pm
Subject: NPImageExpose
Nokia created an extension to NPAPI and it has been supported by the
flash plugin running on the N900 device.  It allows them to quickly
draw directly to a shared image buffer.  This improves drawing
performance on in Fennec as we can avoid X.

Here is a sketch of the proposal.  I invite you to consider and
respond:

We are proposing a NPAPI extension which would allow a plugin to
render directly into 32-bit buffer in shared memory. The new extension
will be designed so that plugin explicitly makes requests of the user
agent whether the extension is supported (with NPN_GetValue and
NPNVSupportsWindowlessLocal) and then enables the new rendering mode
at runtime (with NPN_SetValue and NPPVpluginWindowlessLocalBool).  In
this way other plugins unaware of new extension will not be disrupted.

When new rendering mode is enabled the Xdrawable field of a standard
XGraphicsExpose event holds a pointer to the new NPImageExpose
structure which among other things contains pointer to the shared
memory buffer, its dimensions, translation and scale factors.

typedef struct _NPImageExpose
{
  char*    data;     /* image pointer */
  int32    stride;   /* Stride of data image buffer */
  int32    depth;    /* Depth of image pointer */
  int32    x;        /* Expose x */
  int32    y;        /* Expose y */
  uint32   width;    /* Expose width */
  uint32   height;   /* Expose height */
  NPSize   dataSize; /* Data buffer size */
  float    translateX; /* translate X matrix value */
  float    translateY; /* translate Y matrix value */
  float    scaleX;     /* scale X matrix value */
  float    scaleY;     /* scale Y matrix value */

} NPImageExpose;

Doug Turner

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Boris Zbarsky  
View profile  
 More options Oct 13 2009, 10:10 pm
Newsgroups: mozilla.dev.tech.plugins
From: Boris Zbarsky <bzbar...@mit.edu>
Date: Tue, 13 Oct 2009 22:10:06 -0400
Local: Tues, Oct 13 2009 10:10 pm
Subject: Re: NPImageExpose
On 10/13/09 8:20 PM, Doug Turner wrote:

> We are proposing a NPAPI extension which would allow a plugin to
> render directly into 32-bit buffer in shared memory.

Can this shared memory be shared between processes?

-Boris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oleg Romashin  
View profile  
 More options Oct 14 2009, 1:45 am
Newsgroups: mozilla.dev.tech.plugins
From: Oleg Romashin <rom...@gmail.com>
Date: Tue, 13 Oct 2009 22:45:13 -0700 (PDT)
Local: Wed, Oct 14 2009 1:45 am
Subject: Re: NPImageExpose

> Can this shared memory be shared between processes?

Yes, this is the main idea of N900 browser.

See: http://docs.google.com/present/view?id=ajk2s2df9zhr_144fb8zrrck
Slide 6.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oleg Romashin  
View profile  
 More options Oct 14 2009, 2:05 am
Newsgroups: mozilla.dev.tech.plugins
From: Oleg Romashin <rom...@gmail.com>
Date: Tue, 13 Oct 2009 23:05:54 -0700 (PDT)
Local: Wed, Oct 14 2009 2:05 am
Subject: Re: NPImageExpose

>      int32    depth;    /* Depth of image pointer */
>    What is the format of the buffer? In particular are there alpha values?

It depends what engine and plugins supports.... it can be any buffer
format

>   int32    x;        /* Expose x */
>   int32    y;        /* Expose y */
>   uint32   width;    /* Expose width */
>   uint32   height;   /* Expose height */
> Is this in terms of buffer coordinates or plugin coordinates?

As I remember it is the buffer coordinates.

>  NPSize   dataSize; /* Data buffer size */
>  Why is this needed?

We are giving whole rendering buffer to plugin... not only part which
is related to buffer.
In this case plugin can render stuff once (with or without alpha), and
engine should not do anything more (copy, composite....)

Also there are one idea, about providing plugin own buffer to the
engine.
For example if plugin cannot paint in engine provided image format,
then plugin does rendering in own buffer, then replacing whole
NPImageExpose structure, or some fields values according to buffer
parameters provided by plugin... and then engine checking that plugin
did rendering into own buffer, and should try to composite plugin
buffer into engine buffer.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Husemann  
View profile  
 More options Oct 14 2009, 3:46 am
Newsgroups: mozilla.dev.tech.plugins
From: Martin Husemann <mar...@aprisoft.de>
Date: Wed, 14 Oct 2009 09:46:00 +0200
Subject: Re: NPImageExpose
Oleg Romashin schrieb:
>>      int32    depth;    /* Depth of image pointer */
>>    What is the format of the buffer? In particular are there alpha values?

> It depends what engine and plugins supports.... it can be any buffer
> format

How does the plugin (or the browser) know which format is used? Can the
plugin force a special format, or does the browser force the most
efficiently blittable one and the plugin has to implement all possible
modes?

Martin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Smedberg  
View profile  
 More options Oct 14 2009, 8:59 am
Newsgroups: mozilla.dev.tech.plugins
From: Benjamin Smedberg <benja...@smedbergs.us>
Date: Wed, 14 Oct 2009 08:59:44 -0400
Local: Wed, Oct 14 2009 8:59 am
Subject: Re: NPImageExpose
On 10/13/09 8:20 PM, Doug Turner wrote:

> Here is a sketch of the proposal.  I invite you to consider and
> respond:

Proposals should be specified at https://wiki.mozilla.org/Plugins

> When new rendering mode is enabled the Xdrawable field of a standard
> XGraphicsExpose event holds a pointer to the new NPImageExpose
> structure which among other things contains pointer to the shared
> memory buffer, its dimensions, translation and scale factors.

Does this only apply in the context of windowless plugin instances? Or would
all plugin instances be forced into windowless mode when this drawing mode
was enabled?

How does this interact with transparent (partially-drawn) plugins? Is the
plugin only allowed to draw to the shared-memory buffer at certain times, so
that it can integrate properly with z-order painting?

This proposal seems very similar, at least in theory, to the pepper
platform-independent-plugins proposal that Google has drawn up:
https://wiki.mozilla.org/Plugins:PlatformIndependentNPAPI#Plugins_and...

One of the particular advantages of pepper (and the pepper-like drawing
model that Chrome uses for windowless plugins currently) is that you give
the plugin a drawable which is *not* the direct screen surface. This means
that the plugin host can composite that drawable with other DOM elements
(underlays and overlays) asynchronously, and you never have to synchronously
wait for the plugin to paint.

--BDS


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oleg Romashin  
View profile  
 More options Oct 14 2009, 11:49 am
Newsgroups: mozilla.dev.tech.plugins
From: Oleg Romashin <rom...@gmail.com>
Date: Wed, 14 Oct 2009 08:49:22 -0700 (PDT)
Local: Wed, Oct 14 2009 11:49 am
Subject: Re: NPImageExpose
> Does this only apply in the context of windowless plugin instances? Or would

Only for context... final decision about drawing mode support is up to
plug-in.
Also even when new drawing model is accepted, plug-in should be ready
to paint in old modes too. (XWindow context)
I'm not sure what is the best way to do it... but we should notify
plugin somehow what XGraphicsExposeEvent.drawable contain,
NPImageExpose or XDrawable pointer..
Currently we are setting XGraphicsExposeEvent.display = 0 to identify
plugin that this expose event is not X-related.

> How does this interact with transparent (partially-drawn) plugins? Is the
> plugin only allowed to draw to the shared-memory buffer at certain times, so
> that it can integrate properly with z-order painting?

z-ordering is the same as in normal windowless pipeline.. builder
DisplayList define when plugin should paint it's data.

> This proposal seems very similar, at least in theory, to the pepper
> platform-independent-plugins proposal that Google has drawn up:https://wiki.mozilla.org/Plugins:PlatformIndependentNPAPI#Plugins_and...

I'll check it.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oleg Romashin  
View profile  
 More options Oct 14 2009, 1:52 pm
Newsgroups: mozilla.dev.tech.plugins
From: Oleg Romashin <rom...@gmail.com>
Date: Wed, 14 Oct 2009 10:52:52 -0700 (PDT)
Local: Wed, Oct 14 2009 1:52 pm
Subject: Re: NPImageExpose

> This proposal seems very similar, at least in theory, to the pepper
> platform-independent-plugins proposal that Google has drawn up:https://wiki.mozilla.org/Plugins:PlatformIndependentNPAPI#Plugins_and...

do we have any bug in mozilla about this new API? patches for mozilla,
plugin-examples? something to try and check the list of possible
problems...

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Doug Turner  
View profile  
 More options Oct 14 2009, 4:01 pm
Newsgroups: mozilla.dev.tech.plugins
From: Doug Turner <doug.tur...@gmail.com>
Date: Wed, 14 Oct 2009 13:01:53 -0700 (PDT)
Local: Wed, Oct 14 2009 4:01 pm
Subject: Re: NPImageExpose

In talking with a few people, there is a lot of improvement we can
make on this API --  maybe pepper is the right approach.

The API I was spec-ing out above exists and is in use on the Nokia
n900 devices.  Assuming that we address issues raised above w/r/t
format of the image buffer, clipping, and what does the plugin
actually have to draw into the image buffer, I would like to propose
this API as a Maemo only extension to the NPAPI.

Thoughts?  Objections?

Doug


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Smedberg  
View profile  
 More options Oct 14 2009, 4:56 pm
Newsgroups: mozilla.dev.tech.plugins
From: Benjamin Smedberg <benja...@smedbergs.us>
Date: Wed, 14 Oct 2009 16:56:11 -0400
Local: Wed, Oct 14 2009 4:56 pm
Subject: Re: NPImageExpose
On 10/14/09 4:01 PM, Doug Turner wrote:

> The API I was spec-ing out above exists and is in use on the Nokia
> n900 devices.  Assuming that we address issues raised above w/r/t
> format of the image buffer, clipping, and what does the plugin
> actually have to draw into the image buffer, I would like to propose
> this API as a Maemo only extension to the NPAPI.

> Thoughts?  Objections?

The biggest issue I want to address is the painting model. Chrome experience
with OOP plugins shows that you really want to have an asynchronous painting
model such as the one provided by pepper.

Is there a reason pepper wouldn't give the performance needed by Flash,
instead of having yet another rendering model?

--BDS


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Doug Turner  
View profile  
 More options Oct 14 2009, 5:13 pm
Newsgroups: mozilla.dev.tech.plugins
From: Doug Turner <doug.tur...@gmail.com>
Date: Wed, 14 Oct 2009 14:13:26 -0700 (PDT)
Local: Wed, Oct 14 2009 5:13 pm
Subject: Re: NPImageExpose
On Oct 14, 1:56 pm, Benjamin Smedberg <benja...@smedbergs.us> wrote:

I am not suggesting that we do not do pepper for Maemo.

Right now, the n900 is just about done.  I do not expect there to be
any significant changes in flash before we ship Fennec 1.0.  We have
something that has been implemented by the platform (the n900), and we
can either take advantage of it, or not.  I think we do want to take
advantage of it for speed, but advise other plugins not to use this
approach.

Doug


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Smedberg  
View profile  
 More options Oct 14 2009, 5:16 pm
Newsgroups: mozilla.dev.tech.plugins
From: Benjamin Smedberg <benja...@smedbergs.us>
Date: Wed, 14 Oct 2009 17:16:11 -0400
Local: Wed, Oct 14 2009 5:16 pm
Subject: Re: NPImageExpose
On 10/14/09 5:13 PM, Doug Turner wrote:

> Right now, the n900 is just about done.  I do not expect there to be
> any significant changes in flash before we ship Fennec 1.0.  We have
> something that has been implemented by the platform (the n900), and we
> can either take advantage of it, or not.  I think we do want to take
> advantage of it for speed, but advise other plugins not to use this
> approach.

Since we'll have OOP plugins (or OOP tabs, which have the same rendering
problem) in the 1.1 release, and OOP plugins cannot use the approach as it's
currently specced, it seems like we'd be digging ourself into a hole which
only partly-works and isn't very well designed.

--BDS


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Doug Turner  
View profile  
 More options Oct 14 2009, 10:27 pm
Newsgroups: mozilla.dev.tech.plugins
From: Doug Turner <doug.tur...@gmail.com>
Date: Wed, 14 Oct 2009 19:27:08 -0700 (PDT)
Local: Wed, Oct 14 2009 10:27 pm
Subject: Re: NPImageExpose
On Oct 14, 2:16 pm, Benjamin Smedberg <benja...@smedbergs.us> wrote:

> On 10/14/09 5:13 PM, Doug Turner wrote:

> > Right now, the n900 is just about done.  I do not expect there to be
> > any significant changes in flash before we ship Fennec 1.0.  We have
> > something that has been implemented by the platform (the n900), and we
> > can either take advantage of it, or not.  I think we do want to take
> > advantage of it for speed, but advise other plugins not to use this
> > approach.

> Since we'll have OOP plugins (or OOP tabs, which have the same rendering
> problem) in the 1.1 release, and OOP plugins cannot use the approach as it's
> currently specced, it seems like we'd be digging ourself into a hole which
> only partly-works and isn't very well designed.

> --BDS

This API clearly doesn't satifiy our requirements for OOP and it is
X11 specific.  However, it is what it is and support for it is on the
n900 devices.  If we want faster flash on the n900, we will want to
support this NPAPI feature -- even if it is just on maemo.

Doug


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Doug Turner  
View profile  
 More options Oct 16 2009, 12:42 pm
Newsgroups: mozilla.dev.tech.plugins
From: Doug Turner <doug.tur...@gmail.com>
Date: Fri, 16 Oct 2009 09:42:13 -0700 (PDT)
Local: Fri, Oct 16 2009 12:42 pm
Subject: Re: NPImageExpose

> This API clearly doesn't satisfy our requirements for OOP and it is
> X11 specific.  However, it is what it is and support for it is on the
> n900 devices.  If we want faster flash on the n900, we will want to
> support this NPAPI feature -- even if it is just on maemo.

I am trying to be pragmatic, but I really dislike this API too.  It is
a shame that we couldn't influence the design and build something that
would be more useful.  Josh -- do you have any objection with
documenting this as what it is and implementing support for it on
Maemo only?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »