Proposal: Revive Async Drawing API

David Anderson danderson at mozilla.com
Tue Nov 17 21:30:38 UTC 2015


Hi All,

In 2012, an API for hardware-accelerated, windowless drawing was proposed
and accepted [1]. Flash used this API in beta but it never went to release,
and the API was thus retracted in early 2014.

This code was never removed from Flash, and builds from Adobe with it
re-enabled still work as intended. This is a huge performance boon to
windowless plugins, and it removes one of the remaining use cases for
windowed plugins. We would like to move forward with the API again.

I have made two changes to the original documentation:
 (1) NPN_SetCurrentAsyncSurface() must be called from the main thread,
rather than any thread. This simplifies its implementation in browsers, and
matches the behavior already implemented in Flash.
 (2) A new NPNVariable, NPNVpreferredDXGIAdapter. This allows Flash to
negotiate the correct GPU with Firefox, a problem not originally
anticipated since dual GPUs were not popular when this API was first made.

Proposed SDK changes [2] and sample plugin with both drawing models [3] are
available.

Best,

-David

[1] https://wiki.mozilla.org/NPAPI:AsyncDrawing
[2] https://github.com/mozilla/npapi-sdk/pull/28
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1217665
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/plugin-futures/attachments/20151117/e763d2cf/attachment.html>


More information about the plugin-futures mailing list