New release of Photopea is out! It has 27 587 lines of code. Play with it at the main site.
- WebGL acceleration
- Eyedropper tool
- Faster rasterization of layer styles
- Several bugs removed
Most of modern native image editors use GPU acceleration, usually through OpenGL interface. Since this release, Photopea is also accelerated, thanks to WebGL interface. Acceleration can be enabled or disabled at any time during work, using a checkbox at the top of the editor.
Pixel data of each layer are stored in WebGL memory. WebGL is used for blending (for all blend modes), weighted average (used in masking and layer styles) and for user interface (applying zoom on project, combining with background grid, highlighting selection area etc). We plan to use hadrware acceleration also for other operations in the future.
Redrawing a project with resolution 2048x1152 pixels, with 10 full-size layers and 3 layer effects takes 850 ms without WebGL acceleration, and 55 ms with acceleration. Try it by yourself on your own device in this demo. Feel free to download PSD and open it in Photoshop or Gimp for comparison. In my case, Photopea seems even a little smoother.