samizdatco / skia-canvas

A GPU-accelerated 2D graphics environment for Node.js
MIT License
1.7k stars 66 forks source link

Render bitmaps on the GPU by default #105

Closed samizdatco closed 2 years ago

samizdatco commented 2 years ago

Rendering now occurs on the GPU by default, using Metal on macOS and Vulkan on Linux & Windows.

The Canvas object has a new property called .gpu which will be initialized to true if the system supports hardware rendering. If the user sets .gpu to false, the canvas will switch to the software renderer that skia-canvas has used in its previous releases (and which it falls back to if it can't initialize the GPU).


The GPU renderer work also uncovered the root causes of some bugs which are now fixed: