This patch represents the contents of 'kazakov/multithreaded-brushes' branch.
Now Pixel Brush engine is fully multithreaded. The number of used threads is controlled by the Threads Limit option in "Performance" tab of the preferences.
rempt |
Krita |
This patch represents the contents of 'kazakov/multithreaded-brushes' branch.
Now Pixel Brush engine is fully multithreaded. The number of used threads is controlled by the Threads Limit option in "Performance" tab of the preferences.
All the features of Pixel Brush should work as usual, but several times faster :)
No Linters Available |
No Unit Test Coverage |
Okay, most of this goes above my head, but I found a typo that might need to be fixed.
I do have a vague comprehension now of how the new system works, it'll be interesting to get the hsv patch for colored brush masks weaved in anew.
libs/pigment/KoColor.cpp | ||
---|---|---|
40 | This is a bit silly, but maybe this typo could be fixed before merge? Then we won't have to force people to build all of krita again when someone fixes the typo later :p | |
plugins/paintops/defaultpaintops/brush/kis_brushop.cpp | ||
265 | This and line 257... their results seem virtually the same. Any reason why you check them seperately? |
I mostly just spent some time and tested painting using different brushes, instant preview, and looked at the live preview. Everything seems to work really well!
Great job! This is really exciting.
Patches of this size aren't reviewable... So it'll testing in practice.
Bugs and notes are to be collected here:
Hi, @woltherav!
Thank you for the notes! I have fixed them locally and will push directly into the branch :)
libs/pigment/KoColor.cpp | ||
---|---|---|
40 | Fixed! Thank you! | |
plugins/paintops/defaultpaintops/brush/kis_brushop.cpp | ||
265 | Yes, in case we have both types of mirrors, we should copy the dab 3 times :) Just note, that there is no "else" branch. It just adds one more mirroring step in case the both mirrors are active. It allows us to avoid one copying. Anyway, I will add a comment into the code giving details about that. |
There, uh, was a minor bug with the brush preview that I went and fixed: https://phabricator.kde.org/R37:06ea68a92974976c96a6f4560e47af3caadba654
Not sure what exactly caused it, but we might be mindful that the new kocolor default might cause this in other places.
Commit | Tree | Parents | Author | Summary | Date |
---|---|---|---|---|---|
46eb9ae70408 | 6541c31ad643 | c3a1ef807b00 | Dmitry Kazakov | Fix live preview for the multithreaded brush (Show More…) | Nov 1 2017, 6:31 PM |
c3a1ef807b00 | f6217ecccc33 | 50d326b3e246 d2eb0721fbc0 | Dmitry Kazakov | Merge remote-tracking branch 'origin/master' into kazakov/multithreaded-brushes (Show More…) | Nov 1 2017, 5:50 PM |
50d326b3e246 | 6c53df8f3ccd | d93da94864a9 | Dmitry Kazakov | Add a class for checking correctness of concurrent access to image areas | Nov 1 2017, 4:51 PM |
d93da94864a9 | efb0330f038d | eeeedd6eb31c | Dmitry Kazakov | Fixes two "lost tiles" problems in the multithreaded brush (Show More…) | Nov 1 2017, 4:48 PM |
eeeedd6eb31c | ce8c32d9b630 | 493e8c27daa5 | Dmitry Kazakov | Fix imagepipe brushes to support multithreaded mode | Oct 26 2017, 6:09 PM |
493e8c27daa5 | 113088ebf065 | 9671b94f9c96 | Dmitry Kazakov | Implement a simple benchmark for the threaded brushes | Oct 25 2017, 1:58 PM |
9671b94f9c96 | cb2be1f04c3f | 559862899e64 | Dmitry Kazakov | Fix the freehand stroke test by increasing the fuzzyness | Oct 25 2017, 12:03 PM |
559862899e64 | e0ee9dfe6ef1 | 7bff11b69601 | Dmitry Kazakov | Fix initialization of the resources manager for stroke-based tests | Oct 25 2017, 11:57 AM |
7bff11b69601 | 9fdb37d63ae7 | c11fbf6e5a2a | Dmitry Kazakov | Fix config update problem | Oct 20 2017, 3:15 PM |
c11fbf6e5a2a | 529b6a5d5039 | 73ee104ce86d | Dmitry Kazakov | Fix KisDabRenderingQueue and its unittest after the refactoring (Show More…) | Oct 20 2017, 3:02 PM |
73ee104ce86d | 8dd287114430 | 4461dcaf7814 | Dmitry Kazakov | Fix initialization of KoColor to use QGlobalStatic (Show More…) | Oct 20 2017, 3:00 PM |
4461dcaf7814 | 7fefe7434c2c | dbb062fb089f | Dmitry Kazakov | Add more comments | Oct 20 2017, 11:36 AM |
dbb062fb089f | 24c6127930c9 | 02461e0852a1 | Dmitry Kazakov | Refactor KisDabRenderingQueue to use shared pointers for jobs instead of copying (Show More…) | Oct 20 2017, 11:33 AM |
02461e0852a1 | 18cffd9291a7 | e10883e22863 | Dmitry Kazakov | Cache 'lastDabJob' value (Show More…) | Oct 19 2017, 10:05 AM |
e10883e22863 | 8f7a42625896 | 5bec6444fb31 | Dmitry Kazakov | Make dab rendering resources not to be shared among the dab jobs (Show More…) | Oct 19 2017, 9:56 AM |
5bec6444fb31 | ec9254dddaa4 | 2b5e8e61793e | Dmitry Kazakov | Avoid extra deep-copies of dabs when mirroring is active (Show More…) | Oct 18 2017, 1:05 PM |
2b5e8e61793e | 1fc24c810ff8 | 6f4b8aaf146c | Dmitry Kazakov | Use KisRandomSource instead of std::random_device (Show More…) | Oct 18 2017, 11:39 AM |
6f4b8aaf146c | e57d6d2b0ede | eaf421ab7e22 | Dmitry Kazakov | Fix memory leak in KisAirbrushOption | Oct 18 2017, 11:38 AM |
eaf421ab7e22 | aa3c1377a1bc | 67eea20583cc | Dmitry Kazakov | Fix a crash and a hangup caused by threading issues in KisUpdateJobItem (Show More…) | Oct 18 2017, 11:34 AM |
67eea20583cc | fb852c81705f | de6ff1a62ae7 | Dmitry Kazakov | Implement showing brush performance log on canvas overlay (Show More…) | Oct 16 2017, 11:47 AM |
de6ff1a62ae7 | e09580b6873b | b6b7ba3c477b | Dmitry Kazakov | Fix connection of Throttling plugin to real image cores | Oct 14 2017, 6:47 AM |
b6b7ba3c477b | 5dab61a3dae2 | b51d1090f6e0 | Dmitry Kazakov | Fix Instant Preview for the threaded version of the brush | Oct 13 2017, 4:14 PM |
b51d1090f6e0 | de2581cebddb | 115a4c3cf50d | Dmitry Kazakov | Optimize calculation of reference FPS for the brushes (Show More…) | Oct 13 2017, 2:46 PM |
115a4c3cf50d | 091f254685c2 | eb2e49b279a7 a892dea9f70e | Dmitry Kazakov | Merge remote-tracking branch 'origin/master' into kazakov/multithreaded-brushes | Oct 13 2017, 1:20 PM |
eb2e49b279a7 | 1881af4bc5e3 | ba953714cd83 | Dmitry Kazakov | Move all the stroke speed metrics calculation into FreehandStroke (Show More…) | Oct 13 2017, 1:06 PM |
ba953714cd83 | baedebb92eee | f1bae7acac2d 1183debcf3bd | Dmitry Kazakov | Merge remote-tracking branch 'origin/master' into kazakov/multithreaded-brushes (Show More…) | Oct 12 2017, 10:15 AM |
f1bae7acac2d | 872162a12a16 | 4e2cff2ad3df | Dmitry Kazakov | Don't recalculate device extent too often (Show More…) | Oct 11 2017, 5:37 PM |
4e2cff2ad3df | a2a89129efee | f3f864499ed8 | Dmitry Kazakov | Recycle KisFixedPaintDevice objects thoughout the lifetime of KisBrushOp (Show More…) | Oct 11 2017, 5:15 PM |
f3f864499ed8 | 6c999a961a3f | 78df41469bae | Dmitry Kazakov | Post updates to the scheduler in bunches (Show More…) | Oct 11 2017, 1:06 PM |
78df41469bae | 78b506520e19 | 13e2576e184e | Dmitry Kazakov | Don't let paintop async update be entered twice | Oct 10 2017, 4:51 PM |
13e2576e184e | f1d035cc4b0f | 13f159e9013a | Dmitry Kazakov | Remove now unused no-fill dab generation method | Oct 10 2017, 3:46 PM |
13f159e9013a | 0d9cdecedd5b | 28e049d17592 | Dmitry Kazakov | Fix KisFixedPaintDevice not to refill the data all the time (Show More…) | Oct 10 2017, 3:22 PM |
28e049d17592 | 5959687520fd | 6c4109a60283 | Dmitry Kazakov | Don't pass dirty node to the dab job (Show More…) | Oct 9 2017, 6:20 PM |
6c4109a60283 | 7a4428dca9ca | cc8852a63740 | Dmitry Kazakov | KisDabRenderingJob shouldn't be KisSharedRunnable anymore (Show More…) | Oct 9 2017, 6:14 PM |
cc8852a63740 | ba5dcda8545d | ab46e6977db0 | Dmitry Kazakov | Use rolling mean wrapper in KisAnimationPlayer to avoid QtCreator's crashes (Show More…) | Oct 9 2017, 6:11 PM |
ab46e6977db0 | aa336bcfd649 | 859ac4950364 | Dmitry Kazakov | Fix KisFigurePaintingToolHelper to update the image after the rendering is done | Oct 9 2017, 6:07 PM |
859ac4950364 | 83afe66de869 | 0f1a20d37035 | Dmitry Kazakov | Implement fake stroke jobs executor for usage in tests | Oct 9 2017, 5:56 PM |
0f1a20d37035 | d600ef1fdd0b | fa8ba8220afd | Dmitry Kazakov | Port KisBrushOp to use "mutated" and "uniquely concurrent" jobs (Show More…) | Oct 9 2017, 5:35 PM |
fa8ba8220afd | 4601a1bb1570 | 35afd76f537f | Dmitry Kazakov | Refactor addMutableJob() into addMutableJobs() (Show More…) | Oct 6 2017, 8:53 PM |
35afd76f537f | c79f35635987 | b1d2e33a8083 | Dmitry Kazakov | Fix two crashes in a unittest | Oct 6 2017, 8:53 PM |
b1d2e33a8083 | f3e757539d4c | b3c74c7e3b0a | Dmitry Kazakov | Implement a concept of "Uniquely Concurrent" jobs for strokes system (Show More…) | Oct 6 2017, 2:33 PM |
b3c74c7e3b0a | 4882bfff983c | c18752b5fcd5 | Dmitry Kazakov | Implement mutated jobs framework (Show More…) | Oct 5 2017, 3:37 PM |
c18752b5fcd5 | 0dbbc98c11c3 | 236c8ca9160e | Dmitry Kazakov | Fix KisStrokesQueueTest (Show More…) | Oct 5 2017, 12:28 PM |
236c8ca9160e | 7314030fbc80 | 0a69adbbd792 | Dmitry Kazakov | Implement simple stroke speed measurement logging (Show More…) | Sep 30 2017, 2:43 PM |
0a69adbbd792 | 032540d2dd49 | 2ce8510564f3 | Dmitry Kazakov | Don't expose current paintop from the helper (Show More…) | Sep 30 2017, 2:41 PM |
2ce8510564f3 | 2cc9fcb50b21 | b4b654940ffc | Dmitry Kazakov | Implement a utility class for measuring the speed of the stroke rendering | Sep 30 2017, 2:37 PM |
b4b654940ffc | 45b80eb19011 | bf7aeb1add39 | Dmitry Kazakov | Fix crash when trying to paint with colorsmudge paintop (Show More…) | Sep 30 2017, 8:40 AM |
bf7aeb1add39 | 8c002db0f37e | e36632e0fc94 | Dmitry Kazakov | Rewrite massive bltFixed(rect, dabs) implementation (Show More…) | Sep 29 2017, 7:30 PM |
e36632e0fc94 | 2fe245b711bd | 9b2e1454856a | Dmitry Kazakov | Implement a debugging class for measuring statistical distribution of values (Show More…) | Sep 29 2017, 6:53 PM |
9b2e1454856a | 051cc023985f | 00aad4b22209 | Dmitry Kazakov | Use KisRollingMeanAccumulatorWrapper in KisDabRenderingQueue (Show More…) | Sep 29 2017, 6:47 PM |
00aad4b22209 | 209a277bb099 | 43908f87d45b | Dmitry Kazakov | Implement KisRollingMeanAccumulatorWrapper to prevent QtCreator from crashing (Show More…) | Sep 29 2017, 6:46 PM |
43908f87d45b | 1fc61ff2b658 | 73e358878a85 | Dmitry Kazakov | Don't recalculate an adjustment layer, which is in invisible passthrough group (Show More…) | Sep 26 2017, 2:45 PM |
73e358878a85 | b00cecfe14d5 | 916e7e28dd9c | Dmitry Kazakov | Fix crash in threaded brush (Show More…) | Sep 26 2017, 2:43 PM |
916e7e28dd9c | 64e12d30d0a1 | e457e3731ac7 | Dmitry Kazakov | Deinitialize Python-based dockers when the last document is closed (Show More…) | Sep 26 2017, 9:05 AM |
e457e3731ac7 | e1726f946e57 | bdb2e7fc2d75 | Dmitry Kazakov | Fix crash when opening a document after closing the previous one (Show More…) | Sep 26 2017, 8:53 AM |
bdb2e7fc2d75 | 78bd1f3acffc | 16af18477079 | Dmitry Kazakov | KisMimeDatabase should contain suffixes without '*.' prefix (Show More…) | Sep 22 2017, 6:39 PM |
16af18477079 | f87c1b649203 | b62f9ba00d8a | Dmitry Kazakov | Implement selection handling when rendering massive bitBlt | Sep 22 2017, 4:17 PM |
b62f9ba00d8a | 7694cc11bf76 | 455e7020ae83 | Dmitry Kazakov | Implement mirroring of the multithreaded brush | Sep 22 2017, 2:49 PM |
455e7020ae83 | 71fc2322dfe8 | 4f1c090ecefb | Dmitry Kazakov | Implement Color Source and Sharpness/Texturing postprocessings for threaded… (Show More…) | Sep 21 2017, 1:56 PM |
4f1c090ecefb | 0c24284df92c | d82e9393fdf1 | Dmitry Kazakov | Ensure all the dabs are generated before issuing the very last update (Show More…) | Sep 20 2017, 7:37 PM |
d82e9393fdf1 | 76b9524fecd8 | e03e95338b7d | Dmitry Kazakov | Fix crash when the queue was destroyed before the pool ended | Sep 20 2017, 7:00 PM |
e03e95338b7d | eb9888f5362f | 82dcd6efc277 | Dmitry Kazakov | Implement the first version of the multithreaded Pixel Brush (Show More…) | Sep 20 2017, 3:23 PM |
82dcd6efc277 | 06811ee7e82d | a1979311f392 | Dmitry Kazakov | Fix saving of lastly used video encoding options | Sep 15 2017, 2:55 PM |
a1979311f392 | c9e0ee5a2674 | 148c409abc62 | Dmitry Kazakov | Fix saving of 16f and 32f images into PNG (Show More…) | Sep 15 2017, 2:54 PM |
148c409abc62 | 96d3a24271d0 | f1a0cae11123 | Dmitry Kazakov | Add a comparison operator to KisDabShape | Sep 15 2017, 11:57 AM |
f1a0cae11123 | d8963ed0155c | 5bb1900972b7 | Dmitry Kazakov | Implement a caching queue for multithreaded dab generation (Show More…) | Sep 15 2017, 11:56 AM |
5bb1900972b7 | cd19b91ee9fc | b5b456eb7773 | Dmitry Kazakov | Implement KisSharedThreadPoolAdapter concept (Show More…) | Sep 15 2017, 11:46 AM |
b5b456eb7773 | c2cfff35880c | 18e3c7a10140 | Dmitry Kazakov | Refactor KisDabCache into two smaller classes (Show More…) | Sep 13 2017, 6:41 AM |
18e3c7a10140 | 6ba08df8c9a5 | 9dcc522b9931 | Dmitry Kazakov | Refactor KisPaintInformation to not keep a link to KisDistanceInformation (Show More…) | Sep 13 2017, 6:14 AM |
9dcc522b9931 | 903e13f760dd | a0b8649a4565 | Dmitry Kazakov | Implement KisPainter::bltFixed() that can merge multiple dabs at once (Show More…) | Aug 18 2017, 7:42 AM |