-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skia Rework #211
Skia Rework #211
Conversation
Codecov Report
@@ Coverage Diff @@
## master #211 +/- ##
==========================================
- Coverage 44.79% 0.04% -44.76%
==========================================
Files 301 305 +4
Lines 12199 12164 -35
Branches 1205 1226 +21
==========================================
- Hits 5465 5 -5460
- Misses 6463 12159 +5696
+ Partials 271 0 -271
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make a 512x512 canvas, draw a line diagonally going from top left to bottom right (the line should separate the canvas in two). Using the fill tool, double click on one of the halves. Wait for it to process and then move your mouse to the second half. The second half gets filled too because the mouse button got stuck (doesn't happen all the time, try again if it didn't).
I did some not-so-scientific testing to find out that the new algorithm is about 6.5 times faster than the previous one. (474 ms vs 72 ms on the image I tested). Howerer, the previous algorithm used to run in 0 ms in cases where you are trying to fill the area with it's same color (e.g. fill a white area with white). The new algorithm takes about the same time in this case (72 ms). The fill tool gets used at least twice every time you click, and way more than twice if you click and drag. Because of that the new algorithm can actually be slower, as the previous one only ran for a long time once while the new one takes the same time to run many times in a row.
TLDR: make it so fill tool is only called once per click and/or don't fill the area if it's color matches the fill color.
…ebasedchange files on dispose)
0.1.6.6 dev release
Should work faster than forest fire. This is a preparation for direct bitmap reworkPixiEditor used to do all image processing using WriteableBitmap/WriteableBitmapEx. That approach proved to have multiple problems such as:
This PR changes the entirety of PixiEditor to use SkiaSharp library for drawing. It also changes all tools to work with the bitmaps directly using SkiaSharp drawing functions wherever possible. Apart from that there are some minor changes, mainly the optimization of fill algorithm.