Introduce to Chrome plugin


In this diagram, it describes how was the Chrome been designed. If we want to develop some plugins on Chrome, we have several ways.
  1. First, we could use NPAPI which Firefox also follow it interface. (Out of process plugin)
  2. Second, we could choose to write NaCI which support native code( C/C++) be compiled to nexe and be executed on the Chrome sandbox, it would bring some performance benefits because we could enjoy the performance from native code. NaCI provides PPAPI which is different from NPAPI because PPAPI is in order to focus on high performance for 3D/2D rendering, and Google has recommended it to Mozilla but Mozilla not yet decided to support it.
  3. Third, Chrome has some in-Process-plugins that are internal plugins. They could enjoy the PPAPI .

Flash player on Chrome
Chrome provides the Flash Player Pepper in order to let chrome be convenient to maintain and keep it is secure. BTW, Chrome make it be in-process-plugin type and utilize PPAPI in rendering. Flash Player Pepper is different to Adobe Flash Player which use NPAPI interface.

Chrome wants to use PPAPI to involve NaCI, Flash Player and WebGL, because they all support OpenGL ES 2.0. However, it restricts the future of Flayer Player on Chrome due to Stage3D is still possible to support D3D11. With NPAPI based flash player on Windows:  Stage3D->AGAL->DirectX->SwiftShader, but with PPAPI based one: Stage3D->AGAL->OpenGLES2->IPC channel->OpenGLES2->DirectX->SwiftShader, there are a lot of tasks be translated, therefore, it would bring performance hit.

Layout engine:
  • Chrome: Webkit
  • Firefox: Gecko

 Reference:
http://www.chromium.org/nativeclient/getting-started/getting-started-background-and-basics#TOC-Pepper-Plugin-API-PPAPI- 
http://www.chromium.org/developers/design-documents/pepper-plugin-implementation
http://blogs.adobe.com/flashplayer/tag/chrome-flash-player-pepper
http://docs.unity3d.com/Documentation/Manual/nacl-gettingstarted.html


Comments

Popular posts from this blog

Drawing textured cube with Vulkan on Android

glTF loader for Android Vulkan

C++ unit testing & CI integration in GitHub (I/2)