WIP. Expand DrawingBackend API and Canvas.#377
WIP. Expand DrawingBackend API and Canvas.#377JimBobSquarePants wants to merge 80 commits intomainfrom
Conversation
Thanks, mate. I see these as a complete re-envisioning of the library and how it should work with both those targets in mind. There are MAJOR breaking changes*. The new API can support both scenarios but the WebGPU So, in short: Target 2, then 1. I'm changing the entire shape of the library to focus around the new The canvas is designed based on the best features of both System.Drawing *I'm confident that these changes are both necessary and beneficial. This moves the library square into the expectations bracket for users. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #377 +/- ##
======================================
- Coverage 84% 39% -46%
======================================
Files 101 112 +11
Lines 4529 10793 +6264
Branches 654 1095 +441
======================================
+ Hits 3849 4285 +436
- Misses 540 6337 +5797
- Partials 140 171 +31
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This means that it would be of key importance to validate the API with a simple GUI app that truly challenges the rendering engine! I just made this thing with Claude*. We need an equivalent C# app. It can of course do something else (as long as it does mass text rendering!), but we need to make sure we have an HTML5 reference app, and that its' functionality is kept in sync with our C# app's, so we can compare them.
We don't need it to be production ready, but if we find performance bottlenecks, we should identify where is the root cause: suboptimal backend implementation VS the API shape VS our library code. I can chime in into this work later, but not right now. *disclaimer: didn't spend time on deslopification |
Prerequisites
Description
WIP - Still lots of normalization and testing to do!
This PR expand on the backend drawing API and drawing canvas to normalize usage throughout the library and to better allow custom backends both CPU and GPU.
There's an experimental WebGPU backend in the repo but it's nowhere near production ready so serves simply as a dogfooding tool for the API design. Our new CPU backend is more than fast enough for most usage.