Implement KisRegion with optimized rects compression
The patch fixes two bugs: 1) Freezes when zooming with Intant Preview enabled. The freezes happened due to a very long QRegion calculation in KisSyncLodCacheStrokeStrategy::createJobsData(). Now KisRegion does the calculation 50 times fister. 2) Short 200ms delay in the end of every stroke in KisIndirectPaintingSupport::writeMergeData(). What is KisRegion? The main difference between KisRegion and QRegion is that KisRegion, once created, doesn't allow adding/removing rectangles. It lets us use optimized algorithm for merging rectanges, which is 50-100 times faster than iterational algorithm used in QRegion. When to use KisRegion? By default, use KisRegion. If you need any boolean operation not supported by KisRegion, then use QRegion. KisRegion can be converted to/from QRegion via toQRegion() and fromQRegion() calls. NOTE: these conversion were intentionally made explicit, *not* implicit, because accidental use of QRegion may affect performance significantly. CCBUG:414576
Loading
Please register or sign in to comment