Forum Discussion

HotCakeX's avatar
Mar 27, 2020
Solved

Which one is better? Skia API as the graphics API or OpenGL ES

I'm looking for pros and cons of each API, because Edge Canary version 83.0.467.0 has a new flag called:   Skia API for compositing If enabled, the display compositor will use Skia as the graphic...
  • Thraetaona's avatar
    Mar 28, 2020

    HotCakeX 

     

    Actually, the flag has been there for a while, although sometimes temporary removed due to graphical issues and glitches.

     

    Really depends on the context.  The Platform you are using, the OS, Skia's Backend and finally your use cases can all affect Skia's performance.

     

    Also, Skia itself has a few backends; you could make it use OpenGL ES (called Ganesh).

     

    It's worth mentioning that Skia is already used in most of Chromium's Graphical components, similar to WebRender in Firefox.

     

     

    Comparing Skia to other graphics libraries:

     

    Skia, compared to GDI+ is definitely faster, GDI+ is not even hardware accelerated anymore after Windows Vista.

    Compared to Cairo, Skia seems to be faster, many projects are switching from Cairo to Skia (or other alternatives) aswell.

    Compared to Direct2D which is only available on windows and therefore not cross-platform, both are fast; but Skia is available on a wide variety of devices and operating systems, so it will stay in use by chrome.

     

     

    CPU-based rendering (Especially for 3D) is slow, and the OpenGL ES backend is mostly used for embedded devices like smartphones. Since flags are not even accessible by default on mobile devices, I'll assume OpenGL on Desktop.

     

    It should generally be faster; for MacOS Though, I'm not sure what will happen after Metal and full deprecation of OpenGL.

     

     

    To conclude, GPU-accelerated Skia should be faster.  if you encounter any graphical painting issues or bugs you could turn it off.

     

     

     

Resources