-
Dmitry Kazakov authored
This patch solves the following issues: 1) The original design of the queue expected the list to store *all* the dabs (copies and postprocessing ones) that were requested after the latest real, non-copied dab. That caused severe problems on very trivial brushes (with precision <= 3), which had only 1(!) dab for the stroke (all the other dabs were just clones). These brushes asked the queue to store *all* the dabs of the stroke, which ate and fragmented memory. Such requirement was ruled by the addressing trick: we could get the index of the job by its seqNo in contant time. Now we broke this requirement and started to locate the needed job with binary search in O(log(N)). In our case N will seldom be higher than 1000. 2) Shared pointers also solve the problem of copying the data between original and running job. No no copying happens. 3) KisDabRenderingJob is now split into two classes with different responsibilities. KisDabRenderingJob stored the data for the rendering, and KisDabRenderingJobRunner (derived from QRunnable) executes it. Ref T7052
dbb062fb