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



Popular posts from this blog


Drawing textured cube with Vulkan on Android

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