Skip to content
Commit 2fea6a9b authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

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
parent 0ca332c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment