Follow-up Comment #6, bug #18765 (project mypaint):
In current git, get_actual_radius has been renamed to get_effective_radius,
and it's still only an estimate. There is no such thing as the "correct"
cursor radius. Brushes can change their radius based on pressure, speed, or by
adding jitter to the dab positions. What we have is only an estimate; for
simple brushes it will be correct (and cursor.py does correct for the zoom
level). Just look at the implementation of get_effective_radius() in
lib/brush.py, it doesn't take any dynamics into account.
The estimate could be made better by a) more clever math or b) a
"cursor_size" brushsetting that allows to fine-tune the displayed radius for
every brush individually, if required.
About multicore, I doubt it's worth the effort with the current code. For
updating the cursor positions, we are basically wasting CPU cycles with
unnecessaray work because it was easier to code. Not much point to add all the
complexity of multi-threading, when the CPU cycles are still wasted on
compositing and rotating all layers again and again for every move of the
cursor.
If you want to optimize, I recommend to start by profiling the current code
to get a feeling for what the hotspots are. Personally I like to use the
"perf" utility for this because it will also show you work done inside X11 and
libraries; for the python side, have a look at tests/README.profiling; and
tests/test_performance.py may be useful.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?18765>
_______________________________________________
Nachricht geschickt von/durch Gna!
http://gna.org/
_______________________________________________
Mypaint-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-bugs