OpenACG-Group / Cocoa

A general-purposed 2D rendering framework & visual novel engine.
https://openacg-group.github.io
GNU General Public License v3.0
3 stars 1 forks source link

CanvasKit is deprecated and Skia native APIs are available #4

Open wait1210day opened 1 year ago

wait1210day commented 1 year ago

WebAssembly-based JavaScript module CanvasKit is removed from the project. Instead, Skia native APIs are now available for less overhead while painting.

CanvasKit has been the painting interface for JavaScript in Cocoa for a long time. However, for many reasons, we have to remove it from the repository. Users can still compile a canvaskit.wasm by themselves and import it as a common WebAssembly module to use it. Here are the most important reasons why we deprecate it:

Now with the native Skia APIs, object conversions are not needed anymore, and pixels copying can be reduced to the minimal value. For the music player example shown above, pixels will be copyed N time(s) before it is submitted to Blender or landed on a certain surface: